Intel

AIKIDO-2026-179900

serialize-javascript is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Today

59

Medium Risk

This Affects:

JSserialize-javascript
7.0.1 - 7.1.0
Fixed in 7.1.1
Are you affected? Scan for Free

TL;DR

serialize-javascript escapes </script> sequences inside serialized function bodies so its output can be embedded safely in an inline HTML script element. The escaping only matches a complete </script...> tag within a single serialized value, so a closing script tag split across two separately serialized function bodies is left intact. When the serialized output is written into an HTML script context, the pieces reassemble into a real </script> sequence, break out of the script element, and let injected markup run in the browser. The fix escapes bare </script prefixes at HTML tokenizer delimiters and tracks string, template, regex, and comment spans so the split payload cannot be reassembled.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you embed serialized output containing untrusted function bodies into an HTML script context.

Background info

serialize-javascript is vulnerable to Cross-Site Scripting (XSS) in versions 7.0.1 - 7.1.0.

How to fix this

Upgrade the serialize-javascript library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform