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 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.

Other sources

serialize-javascript 7.0.1 before 7.1.3 XSS via unescaped </script in function body

— Microsoft

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.

— Ubuntu

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.

— IBM

Affected Software

8 affected componentsFixes available
npm/serialize-javascript>=7.0.1<7.1.3
ubuntu/node-serialize-javascript*
ubuntu/node-serialize-javascript*
ubuntu/node-serialize-javascript*
ubuntu/node-serialize-javascript*
debian/node-serialize-javascript<=6.0.0-2+deb12u1, <=6.0.2-1
7.1.4+~5.0.4-1
IBM App Connect Operator<=CD: 12.1.0 - 12.21.0 12.0 LTS: 12.0.0 - 12.0.28 13 LTS: 13.0.0 - 13.6.0
IBM App Connect EnterpriseCertified Containers Operands<=CD: 12.0.11.1-r1 - 12.0.12.5-r1, 13.0.1.0-r1 - 13.0.6.2-r1 12.0 LTS: 12.0.12-r1 - 12.0.12-r28 13 LTS: 13.0.7.0-r1 - 13.0.9.0-r1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/node-serialize-javascript to a version that resolves this vulnerability.

    Fixed in 7.1.4+~5.0.4-1
  2. Upgrade

    Upgrade npm/serialize-javascript to a version that resolves this vulnerability.

    Fixed in 7.1.3

Event History

Oct 23, 2026
CVE Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
CVE Published
via MITRE·01:20 PM
Data Sourced
via MITRE·01:20 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:17 PM
DescriptionSeverityWeakness
Oct 28, 2026
Data Sourced
via OSV·05:50 PM
Affected Software
Oct 29, 2026
Data Sourced
via Microsoft·08:09 AM
DescriptionSeverityWeakness
Nov 9, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

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