CVE-2026-115897: Yahoo Serialize JavaScript XSS via unescaped script tag in function body

CVE-2026-115897 · Severity: low · Published 2026-10-23

Serialize JavaScript is a library that converts JavaScript objects into a serialized format for storage or transmission. The library failed to properly escape script tags when serializing function bodies, allowing an attacker to inject malicious HTML and JavaScript code into a web page by controlling function source text. This could lead to account takeover, data theft, or malware injection for users viewing affected pages.

Technologies: serialize-javascript (npm), Yahoo Serialize-Javascript. Vendors: npm, Yahoo.

Quick answers

Is CVE-2026-115897 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-115897 being exploited in the wild.
How severe is CVE-2026-115897?
Low severity, published 23 October 2026.
Which products and versions are affected?
serialize-javascript (npm) < 7.1.3; Yahoo Serialize-Javascript prior to 7.1.3.
Is there a fix for CVE-2026-115897?
Yes: fixed in 7.1.3. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-115897 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-115897?
Check whether you run serialize-javascript (npm) or Yahoo Serialize-Javascript at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: 7.1.3

Technical details

The vulnerability is a cross-site scripting (XSS) flaw in the `escapeFunctionBody()` function that fails to neutralize a closing `</script` tag appearing at the end of a function body. Since each function body is escaped independently, a bare `</script` prefix at the end of a function body followed by a delimiter (such as a newline from the `space` option) in surrounding output creates an HTML script injection vector. An attacker must control the serialized function's source text via a spoofed `toString()` method.

Affected products

  • Yahoo Serialize JavaScript prior to 7.1.3

Identifiers

  • CVE-2026-115897
  • GHSA-m5mm-p8h7-m29v

Timeline

  • 2026-10-23: disclosed
  • 2026-10-22: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.