CVE-2026-97711
LowCVSS 2.3Exploitation Probability (EPSS)
Low risk21th percentile - higher than 21% of all known CVEs
Summary
Serialize JavaScript from version 7.1.1 until 7.1.2 does not fully protect serialized functions against script-closing tags in attacker-influenced function source. This can cause the script element to terminate early and the remaining output to be parsed as HTML, enabling cross-site scripting in the page origin. Only function values are affected, and the issue is fixed in version 7.1.2.
Risk Assessment
The vulnerability may allow an attacker to inject malicious JavaScript in the page context, potentially leading to data theft, session hijacking, or other XSS attacks.
Recommendation
It is recommended to upgrade serialize-javascript to version 7.1.2 or later to fix the vulnerability.
Other vulnerabilities in serialize-javascript
Original NVD description (English source)
Serialize JavaScript serializes JavaScript values to a superset of JSON that includes regular expressions and functions. From 7.1.1 until 7.1.2, function values serialized by serialize-javascript are not fully protected against script-closing tags in attacker-influenced function source because SCRIPT_CLOSE_REGEXP can consume a second closing tag inside one match. When the serialized function is embedded in a script element, the surviving closing tag terminates the element early and causes the remaining output to be parsed as HTML, enabling cross-site scripting in the page origin. Only function values are affected; ordinary data values and options.isJSON output are unaffected. This issue is fixed in version 7.1.2.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

