Vulnerability · Published Sep 29, 2026 · Assigned by GitHub_M

CVE-2026-97711Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script> in serialized function bodies

Low 2.3

In plain English

A low-severity cross-site scripting in serialize-javascript from yahoo. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 25% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)2.3Low
Exploit odds (30 days)0.3%top 75.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-serialize-javascriptno fix listedDEBIAN-CVE-2026-97711
Debian:13node-serialize-javascriptno fix listedDEBIAN-CVE-2026-97711
Debian:14node-serialize-javascript7.1.2+~5.0.4-1DEBIAN-CVE-2026-97711
Ubuntu:22.04:LTSnode-serialize-javascriptno fix listedUBUNTU-CVE-2026-97711
Ubuntu:24.04:LTSnode-serialize-javascriptno fix listedUBUNTU-CVE-2026-97711
Ubuntu:26.04:LTSnode-serialize-javascriptno fix listedUBUNTU-CVE-2026-97711
Ubuntu:26.10node-serialize-javascriptno fix listedUBUNTU-CVE-2026-97711
npmserialize-javascript7.1.2GHSA-gfhx-hw2g-v5hg

Affected products (as reported)

VendorProductVersions
yahoo serialize-javascript >= 7.1.1, < 7.1.2

Weakness: CWE-79 · Vector: 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

References