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

Published Oct 23, 2026
·
Updated

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.

Affected Software

1 affected component
npm/serialize-javascript>=7.0.1<7.1.3

Event History

Oct 23, 2026
CVE Published
via MITRE·01:20 PM
Data Sourced
via MITRE·01:20 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Deployments using serialize-javascript versions 7.0.1 through before 7.1.3 are affected when serialized output is placed inside an HTML script element. The issue is relevant where attacker-controlled input can influence a function's source representation.

2

What does an attacker need to exploit this?

An attacker needs to control a function's source through a spoofed toString() result and have the application serialize that function into HTML script output. Exploitation also relies on combining output delimiters and later values to form injected markup.

3

What should be done to remediate the issue?

Update serialize-javascript to version 7.1.3 or later. If updating cannot happen immediately, avoid placing serialized function output influenced by untrusted input into HTML script elements.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203