Vulnerability library
Security checkSeptember 08, 2026

SWC HTML minifier may allow script element breakout when minifying embedded JSON

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

Medium severitynpm@swc/html

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

@swc/html minifies JSON contained in script elements such as application/json and application/ld+json by parsing and serializing the JSON value.

Before the patched versions, JSON serialization could convert escaped less-than signs such as \u003C into literal < characters.

Recommendation

Update the @swc/html package to the latest compatible version. Followings are version details:

  • Affected version(s): < 1.15.47-nightly-20260729.1
  • Patched version(s): 1.15.47-nightly-20260729.1

References

Could your website be exposed too?

SmartScanner can check your website for SWC HTML minifier may allow script element breakout when minifying embedded JSON and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated September 08, 2026