Vulnerability library
Security checkOctober 23, 2026

Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script at the end of a serialized function body

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

serialize-javascript escapes its output so it is safe to embed inside a <script> element. Before 7.1.3 that guarantee did not hold for a function value whose source ends in a bare </script.

Recommendation

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

  • Affected version(s): < 7.1.3
  • Patched version(s): 7.1.3

References

Could your website be exposed too?

SmartScanner can check your website for Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script at the end of a serialized function body and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated October 23, 2026