Skip to content
Heist/ feed
Low

Serialize JavaScript: Cross-site scripting (XSS) via unescaped in serialized function bodies

Type: advisorySource: Official CVE List1 source record

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.

Announced Source revision 1
Original source ↗

CVE-2026-97711

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-97711

serialize-javascript

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "yahoo",
    "product": "serialize-javascript",
    "versions": [
      {
        "status": "affected",
        "version": ">= 7.1.1, < 7.1.2"
      }
    ]
  }
]
Related CVEs
CVE-2026-97711

Source reference: /cveMetadata/cveId

Publisher severity

low

Source reference: /containers/cna/metrics

Linked CVE context

These ratings describe the referenced vulnerabilities and products. They are not a severity rating for every application using this dependency.

CVE-2026-97711 · Low

serialize-javascript

Event
#3850 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement