Skip to main content

serialize-javascript CVE-2026-115754

| EUVDEUVD-2026-108967 LOW
Cross-site Scripting (XSS) (CWE-79)
2026-10-23 VulnCheck GHSA-cvqw-cqhx-qmxc
2.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Control a serialized function's toString()
  2. Delivery
    Craft source ending in bare </script
  3. Exploit
    Victim loads page embedding serialized output
  4. Execution
    Browser closes <script> early, parses injected markup
  5. Impact
    <img onerror> handler executes in victim context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Four specific conditions must all hold: (1) the application uses serialize-javascript 7.0.1-7.1.3 to serialize data that includes a function value; (2) the attacker controls that function's source text, in practice via a spoofed toString() returning a body ending in exactly '</script' with no trailing delimiter character; (3) the serialized output is embedded inside an HTML <script> element and the surrounding output (or a later serialized value) supplies the closing '>' and injected markup - the advisory's example relies on the newline emitted by the { space } option; and (4) a victim loads the resulting page (UI:P / passive interaction). LIMITING FACTORS: ordinary function values end in '}' and are unaffected, and non-function values (even strings containing '</script') are escaped correctly, so the flaw cannot be triggered without attacker influence over a serialized function's source - a narrow, application-specific precondition. The complete fix is upgrading to 7.1.3; the only stated workaround if you cannot upgrade is to not serialize function values whose source/toString() an attacker can influence.

Impact

All decision signals point the same way: this is a low-priority issue. The supplied CVSS 4.0 base score is 2.3 (Low) with vector AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N - network-reachable and unauthenticated, but gated by an attack requirement (AT:P) and passive user interaction (UI:P), with no impact to the vulnerable system itself (VC/VI/VA all N) and only low confidentiality/integrity impact to a subsequent system (SC:L/SI:L), consistent with reflected XSS executing in a victim browser rather than compromising the server. The vuln.today decision label is 'monitor', not act_now or emergency. This is NOT in CISA KEV (status: not listed) and no EPSS score was provided, so there is no evidence of active or probable exploitation. The GHSA advisory contains a concrete reproduction (a public PoC reference exists; it is not verified as working exploit code in the input). The dominant limiting factor is the precondition: exploitation requires the attacker to already control the source text of a serialized function, in practice via a spoofed toString() - ordinary function values (which always end in '}') and non-function values are not affected. No signals conflict here; the low CVSS, 'monitor' label, absent KEV, and narrow precondition all agree this is a real-but-low-risk hardening fix, not an urgent threat. EPSS was not supplied, so probabilistic exploitation likelihood could not be cross-checked.

Exploit ScenarioDerived

An application serializes JavaScript objects (via serialize-javascript 7.0.1-7.1.3) and embeds the result inside a <script> element in an HTML page, where at least one serialized function's source text can be influenced by an attacker through a spoofed toString() returning a body ending in a bare '</script'. A victim loads the page; the surrounding output (e.g. the newline from the 'space' option) supplies the tag delimiter and a later serialized value supplies '>' plus markup, so the browser closes the script early and renders injected live markup such as an <img onerror> handler. A working reproduction is published in the GHSA advisory.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 23, 2026

Cross-site scripting in serialize-javascript 7.0.1 before 7.1.3 occurs when a serialized function's attacker-influenced source text ends in a bare </script, letting surrounding output and a later serialized value complete the tag and inject live markup such as an img onerror handler. The flaw only affects applications that serialize attacker-controlled function values via a spoofed toString() and embed the result inside an HTML <script> element; ordinary functions and non-function values are escaped correctly. The vendor fixed this in 7.1.3, no KEV listing or confirmed active exploitation is reported, the advisory's demonstration payload is not verified as working exploit code, and the decision label is monitor.

RemediationAI

Upgrade to serialize-javascript 7.1.3, the vendor-released fixed version (advisory: https://github.com/yahoo/serialize-javascript/security/advisories/GHSA-m5mm-p8h7-m29v; release: https://github.com/yahoo/serialize-javascript/releases/tag/v7.1.3; fix: PR #235 and commit 2864b3c6260a3bfd52d2db3e70d1a079de108a61). If upgrading is not possible, the vendor's only stated workaround is to avoid serializing function values whose source text or toString() can be influenced by an attacker; doing so may break functionality that relies on serializing functions, and no other workaround is given.

Affected VersionsENISA

serialize-javascript 7.0.1 <7.1.3

Affected Packages

npm serialize-javascript fix: 7.1.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

serialize-javascript is an npm/Node.js library that serializes JavaScript objects, including function values, into strings meant to be embedded in HTML <script> elements. It escapes characters such as <, >, /, U+2028 and U+2029 to prevent breaking out of the script context. The root cause is CWE-79: each function body is escaped independently, and SCRIPT_CLOSE_REGEXP only neutralized a bare </script when followed within the same body by TAB, LF, FF, CR, space, /, or >. A body ending exactly at </script had no following delimiter, so it was emitted unescaped; the surrounding output, for example the newline emitted by the space option, supplies the delimiter, and a later serialized value supplies > plus markup. Attacker control over a function's source text through a spoofed toString() is required, and the serialized result must be embedded in an HTML <script> element and loaded by a victim. Ordinary functions end in } and are unaffected, and non-function values, including strings containing </script, are escaped correctly. The fix adds an end-of-string $ alternative to the delimiter lookahead in SCRIPT_CLOSE_REGEXP, per PR #235 and commit 2864b3c6260a3bfd52d2db3e70d1a079de108a61.

Know when Serialize Javascript gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 2.3 LOW
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
vuln.today AI 4.7 MEDIUM

Exploitation needs the attacker-controlled function-source precondition (AC:H, mapping the 4.0 AT:P) and a victim rendering the output (UI:R); XSS executing in the browser gives S:C with low C/I and no availability or server-side impact.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

serialize-javascript from 7.0.1 before 7.1.3 contains a cross-site scripting vulnerability that allows attackers to break out of HTML script elements by ending serialized function source text with an unescaped </script. Attackers controlling a function's source via a spoofed toString() can combine surrounding output delimiters and later values to inject live markup such as img onerror handlers.

Threat Intelligence Overview

EPSS Score
0.3%
Top 76% exploitable
Prevalence
High
very widely used npm serialization library, common transitive build-tool dependency
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy