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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-serialize-javascript | no fix listed | DEBIAN-CVE-2026-97711 |
| Debian:13 | node-serialize-javascript | no fix listed | DEBIAN-CVE-2026-97711 |
| Debian:14 | node-serialize-javascript | 7.1.2+~5.0.4-1 | DEBIAN-CVE-2026-97711 |
| Ubuntu:22.04:LTS | node-serialize-javascript | no fix listed | UBUNTU-CVE-2026-97711 |
| Ubuntu:24.04:LTS | node-serialize-javascript | no fix listed | UBUNTU-CVE-2026-97711 |
| Ubuntu:26.04:LTS | node-serialize-javascript | no fix listed | UBUNTU-CVE-2026-97711 |
| Ubuntu:26.10 | node-serialize-javascript | no fix listed | UBUNTU-CVE-2026-97711 |
| npm | serialize-javascript | 7.1.2 | GHSA-gfhx-hw2g-v5hg |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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