Vulnerability
CVE-2026-97711
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.
15 advisories report this vulnerability, across 5 ecosystems.
Advisories
- CGA-22q8-5px6-qfwr
- CGA-3j3w-765f-9qj4
- CGA-578q-8447-436v
- CGA-7486-hgp2-v678
- CGA-7h5v-v88j-8j26
- CGA-7j85-g85v-h43g
- CGA-8j35-7f68-vrhh
- CGA-ch7f-f363-q4jp
- CGA-jvfh-w96p-fggw
- CGA-qq45-g873-xq25
- CGA-r55x-pw6j-7x39
- CGA-xx27-26gh-9xch
-
DEBIAN-CVE-2026-97711
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…
-
GHSA-gfhx-hw2g-v5hg
Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script> in serialized function bodies
-
UBUNTU-CVE-2026-97711
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…