Serialize JavaScript serializes JavaScript values to a superset of JSON that includes regular expressions and functions. Prior to 7.1.3, the function-source escaping logic does not neutralize a bare closing-script prefix when attacker-influenced function source text ends exactly at that prefix. Because each function body is escaped independently, a delimiter supplied by surrounding serialized output can terminate an HTML script element, and a later serialized value supplies injected markup that becomes a live element in the page. Exploitation requires control of a serialized function's source text, such as through a spoofed toString(). This issue is fixed in version 7.1.3.

Project Subscriptions

Vendors Products
Serialize-javascript Subscribe
Advisories
Source ID Title
Github GHSA Github GHSA GHSA-m5mm-p8h7-m29v Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script at the end of a serialized function body
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Sat, 24 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N'}

threat_severity

Moderate


Fri, 23 Oct 2026 23:45:00 +0000

Type Values Removed Values Added
First Time appeared Yahoo
Yahoo serialize-javascript
Vendors & Products Yahoo
Yahoo serialize-javascript

Fri, 23 Oct 2026 21:45:00 +0000

Type Values Removed Values Added
Description Serialize JavaScript serializes JavaScript values to a superset of JSON that includes regular expressions and functions. Prior to 7.1.3, the function-source escaping logic does not neutralize a bare closing-script prefix when attacker-influenced function source text ends exactly at that prefix. Because each function body is escaped independently, a delimiter supplied by surrounding serialized output can terminate an HTML script element, and a later serialized value supplies injected markup that becomes a live element in the page. Exploitation requires control of a serialized function's source text, such as through a spoofed toString(). This issue is fixed in version 7.1.3.
Title Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script at the end of a serialized function body
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 2.1, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-23T21:37:41.097Z

Reserved: 2026-10-23T19:37:27.177Z

Link: CVE-2026-115897

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-23T22:16:59.153

Modified: 2026-10-23T22:16:59.153

Link: CVE-2026-115897

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-23T21:37:41Z

Links: CVE-2026-115897 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T23:30:17Z

Weaknesses