Vulnerability · Published Oct 23, 2026 · Assigned by GitHub_M

CVE-2026-115897Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script at the end of a serialized function body

Low 2.1

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 24% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)2.1Low
Exploit odds (30 days)0.3%top 76.4% 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. Prior to 7.1.3, the function-source escaping logic does not neutralize a bare closing-script prefix when attacker-influenced function source text ends exactly at that prefix. Because each function body is escaped independently, a delimiter supplied by surrounding serialized output can terminate an HTML script element, and a later serialized value supplies injected markup that becomes a live element in the page. Exploitation requires control of a serialized function's source text, such as through a spoofed toString(). This issue is fixed in version 7.1.3.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmserialize-javascript7.1.3GHSA-m5mm-p8h7-m29v

Affected products (as reported)

VendorProductVersions
yahoo serialize-javascript < 7.1.3

Weakness: CWE-79 · Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

References