p PatchFirst

CVE-2026-97711

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

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

CVSS 2.3 · Low · EPSS 0.3% · Fix available

Published
Updated

Stack: system · node

Affected products and versions

  • serialize-javascript

    Versions
    • >= 7.1.1, < 7.1.2: Affected

    No fix published

  • node-serialize-javascript Debian:12

    Versions
    • 6.0.0-2
    • 6.0.0-2+deb12u1
    • 6.0.1-1
    • 6.0.2-1
    • 7.0.4+~5.0.4-1
    • 7.0.5+~5.0.4-1
    • 7.0.7+~5.0.4-1
    • 7.1.2+~5.0.4-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-serialize-javascript Debian:13

    Versions
    • 6.0.2-1
    • 7.0.4+~5.0.4-1
    • 7.0.5+~5.0.4-1
    • 7.0.7+~5.0.4-1
    • 7.1.2+~5.0.4-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-serialize-javascript Debian:14

    Versions
    • 6.0.2-1
    • 7.0.4+~5.0.4-1
    • 7.0.5+~5.0.4-1
    • 7.0.7+~5.0.4-1
    Affected ranges
    • ECOSYSTEM: < 7.1.2+~5.0.4-1

    Update to 7.1.2+~5.0.4-1

  • serialize-javascript npm

    Affected ranges
    • SEMVER: ≥ 7.1.1, < 7.1.2

    Update to 7.1.2

  • node-serialize-javascript Ubuntu:22.04:LTS

    Versions
    • 5.0.1-2
    • 6.0.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-serialize-javascript Ubuntu:24.04:LTS

    Versions
    • 6.0.1-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-serialize-javascript Ubuntu:26.10

    Versions
    • 7.0.4+~5.0.4-1
    • 7.0.5+~5.0.4-1
    • 7.0.7+~5.0.4-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-serialize-javascript Ubuntu:26.04:LTS

    Versions
    • 6.0.2-1
    • 7.0.4+~5.0.4-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →