CVE-2026-72925
## Impact `@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. If the JSON contained an escaped `</script>` sequence, the generated HTML could terminate the containing script element early because HTML tokenization occurs before the JSON is consumed. Applications that minify HTML containing attacker-controlled JSON data could therefore transform inert data into active markup. A crafted payload could execute script in the origin of the generated page. ## Patches The issue is fixed in: - `@swc/html` 1.15.47 - `swc_html_minifier` 59.0.0 The minifier now re-escapes less-than signs after JSON serialization, preserving the script element boundary. ## Workarounds Users who cannot upgrade can disable JSON minification with: ```js await minify(html, { minifyJson: false, });
Properties
- severity
- medium
- summary
- SWC HTML minifier may allow script element breakout when minifying embedded JSON
- epss_score
- 0.00194
- cvss_score
- 6.1
- ghsa_published
- 2026-09-08T17:58:00Z
- source_url
- https://github.com/advisories/GHSA-5qr2-v392-m9g8
- ghsa_updated
- 2026-09-08T17:58:02Z
- ghsa_id
- GHSA-5qr2-v392-m9g8
- cve_id
- CVE-2026-72925
- cvss_vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- is_ghsa_only
- false
- epss_percentile
- 0.09109
Related Entities (8)
ENRICHED_BY (1)
VULNERABLE_TO (2)
AFFECTS (2)
HAS_WEAKNESS (2)
REPORTED_BY (1)
Explore deeper with Ninja Signal's threat intelligence graph