CVE-2026-72925
MEDIUM 6.1CVSS 3.1SWC HTML minifier may allow script element breakout when minifying embedded JSON
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.
- Published
- 11 Aug 2026
- Last modified
- 18 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Awaiting Analysis
- Weakness
- CWE-116CWE-79
- Also known as
- GHSA-5qr2-v392-m9g8
- Sources
- NVDJSONOSV GHSA-5qr2-v392-m9g8JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | @swc/html | < 1.15.47-nightly-20260729.1 | 1.15.47-nightly-20260729.1 |
| OSV | crates.io | swc_html_minifier | < 59.0.0 | 59.0.0 |
References
- https://github.com/swc-project/swc/commit/e1877b44bdac8abc9fd51e984d584f40f6999832 · WEB
- https://github.com/swc-project/swc/pull/12080 · WEB
- https://github.com/swc-project/swc/releases/tag/v1.15.47 · WEB
- https://github.com/swc-project/swc/releases/tag/v1.15.47-nightly-20260729.1 · WEB
- https://github.com/swc-project/swc/security/advisories/GHSA-5qr2-v392-m9g8 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-72925 · ADVISORY
- https://github.com/swc-project/swc · PACKAGE
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 11 Aug 2026)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 8 Sep 2026)