Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script at the end of a serialized function body
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 7.1.3
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: partial
Summary
The Serialize JavaScript library, which converts JavaScript values (including functions and regular expressions) into a string for embedding in web pages, is affected. An attacker who can influence a serialized function's source text can inject markup that breaks out of a script block and runs malicious code in a user's browser, enabling cross-site scripting.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
Serialize JavaScript serializes JavaScript values to a superset of JSON that includes regular expressions and functions. Prior to 7.1.3, the function-source escaping logic does not neutralize a bare closing-script prefix when attacker-influenced function source text ends exactly at that prefix. Because each function body is escaped independently, a delimiter supplied by surrounding serialized output can terminate an HTML script element, and a later serialized value supplies injected markup that becomes a live element in the page. Exploitation requires control of a serialized function's source text, such as through a spoofed toString(). This issue is fixed in version 7.1.3.
Timeline
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
Affected versions
- yahoo serialize-javascript
fixed in 7.1.3
- serialize-javascriptnpm
fixed in 7.1.3