Vulnerability library
Security checkApril 17, 2026

Cross-site Scripting (XSS) in serialize-javascript

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

A flaw was found in npm-serialize-javascript. The vulnerability occurs because the serialize-javascript module does not properly sanitize certain inputs, such as regex or other JavaScript object types, allowing an attacker to inject malicious code.

Recommendation

Update the serialize-javascript package to the latest compatible version. Followings are version details:

  • Affected version(s): >= 6.0.0, < 6.0.2
  • Patched version(s): 6.0.2

References

Could your website be exposed too?

SmartScanner can check your website for Cross-site Scripting (XSS) in serialize-javascript and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated April 17, 2026