SWC HTML minifier may allow script element breakout when minifying embedded JSON
Summary
| CVE | CVE-2026-72925 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-08-11 15:17:38 UTC |
| Updated | 2026-08-11 19:18:49 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 6.1 MEDIUM from [email protected]
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS: 0.001940000 probability, percentile 0.093220000 (date 2026-08-12)
Problem Types: CWE-79 | CWE-116 | CWE-79 CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | CWE-116 CWE-116: Improper Encoding or Escaping of Output
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 6.1 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| 3.1 | CNA | DECLARED | 6.1 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
RequiredScope
ChangedConfidentiality
LowIntegrity
LowAvailability
NoneCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Swc-project | Swc | affected < 1.15.47 | Not specified |
| CNA | @swc | Html | affected < 1.15.47-nightly-20260729.1 | Not specified |
| CNA | Swc-project | Swc Html Minifier | affected < 59.0.0 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/swc-project/swc/commit/e1877b44bdac8abc9fd51e984d584f40f6999832 | [email protected] | github.com | |
| github.com/swc-project/swc/pull/12080 | [email protected] | github.com | |
| github.com/swc-project/swc/releases/tag/v1.15.47-nightly-20260729.1 | [email protected] | github.com | |
| github.com/swc-project/swc/security/advisories/GHSA-5qr2-v392-m9g8 | [email protected] | github.com | |
| github.com/swc-project/swc/releases/tag/v1.15.47 | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.