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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.1
- **CVSS:** 6.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: Low; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.34% (percentile 20, 2026-11-28)
- **CWE:** CWE-79, CWE-116
- **Aliases:** GHSA-5qr2-v392-m9g8
- **Published:** 2026-08-11T14:45:12.907Z
- **Modified:** 2026-09-18T20:05:53.723Z

## Who should check

- Projects that depend on npm package @swc/html (\< 1.15.47-nightly-20260729.1)
- Projects that depend on crates.io package swc\_html\_minifier (\< 59.0.0)
- Anyone running swc-project swc \< 1.15.47
- Anyone running @swc html \< 1.15.47-nightly-20260729.1
- Anyone running swc-project swc\_html\_minifier \< 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.

## Affected and fixed versions

- npm `@swc/html`: affected \< 1.15.47-nightly-20260729.1; fixed 1.15.47-nightly-20260729.1 (osv)
- crates.io `swc_html_minifier`: affected \< 59.0.0; fixed 59.0.0 (osv)
- swc-project swc: \< 1.15.47 (cvelist)
- @swc html: \< 1.15.47-nightly-20260729.1 (cvelist)
- swc-project swc\_html\_minifier: \< 59.0.0 (cvelist)

## Mitigation

- Upgrade @swc/html to 1.15.47-nightly-20260729.1 or later.
- Upgrade swc\_html\_minifier to 59.0.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-72925. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-72925.md
Affected: @swc/html < 1.15.47-nightly-20260729.1; swc_html_minifier < 59.0.0
Fixed in: 1.15.47-nightly-20260729.1, 59.0.0

Steps:
1. Search this machine and project for @swc/html (npm), swc_html_minifier (crates.io), swc-project swc, @swc html, swc-project swc_html_minifier: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-72925 being exploited?

There is no confirmed exploitation: CVE-2026-72925 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.34% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-72925?

Medium: CVSS 6.1 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-72925?

@swc/html \< 1.15.47-nightly-20260729.1; swc\_html\_minifier \< 59.0.0.

### Is there a fix for CVE-2026-72925?

Yes. Fixed in 1.15.47-nightly-20260729.1, 59.0.0. Upgrade @swc/html to 1.15.47-nightly-20260729.1 or later. Upgrade swc\_html\_minifier to 59.0.0 or later.

### How do I check if I'm affected by CVE-2026-72925?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/swc-project/swc/security/advisories/GHSA-5qr2-v392-m9g8>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-72925>
- patch: <https://github.com/swc-project/swc/pull/12080>
- patch: <https://github.com/swc-project/swc/commit/e1877b44bdac8abc9fd51e984d584f40f6999832>
- other: <https://github.com/swc-project/swc/releases/tag/v1.15.47>
- other: <https://github.com/swc-project/swc/releases/tag/v1.15.47-nightly-20260729.1>
- other: <https://github.com/swc-project/swc>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-72925>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-5qr2-v392-m9g8> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-72925> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-72925>
