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

- Severity: Low 2.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 26% of CVEs (2026-12-01)
- Published: 2026-09-29T16:00:33.534Z
- Modified: 2026-09-30T19:38:27.293Z
- Also known as: GHSA-gfhx-hw2g-v5hg
- Weaknesses: CWE-79, CWE-80
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- yahoo serialize-javascript: >= 7.1.1, < 7.1.2
- serialize-javascript (npm): from 7.1.1 before 7.1.2

## Every score

- GitHub_M: CVSS:4.0 2.3 Low `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`
- GitHub: CVSS:4.0 Low `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`

## References

- <https://github.com/yahoo/serialize-javascript/security/advisories/GHSA-gfhx-hw2g-v5hg> (web)
- <https://github.com/yahoo/serialize-javascript/commit/2bdbaaff9cb8a4639135eb24cfcd383d3fefb534> (web)
- <https://github.com/yahoo/serialize-javascript/releases/tag/v7.1.2> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-97711> (advisory)
- <https://github.com/yahoo/serialize-javascript> (package)

## Sources

- CVE List: [CVE-2026-97711](https://www.cve.org/CVERecord?id=CVE-2026-97711), CVE Terms of Use, modified 2026-09-29
- GitHub Advisory Database: [GHSA-gfhx-hw2g-v5hg](https://github.com/advisories/GHSA-gfhx-hw2g-v5hg), CC-BY-4.0, modified 2026-09-30
- NVD: [CVE-2026-97711](https://nvd.nist.gov/vuln/detail/CVE-2026-97711), Public domain, modified 2026-09-30

---

Page: https://cve.day/CVE-2026-97711 · Whole record: https://cve.day/CVE-2026-97711.json · Rebuilt by cve.day 2026-11-25T22:59:41.488Z
