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

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 9% of CVEs (2026-12-01)
- Published: 2026-08-11T14:45:12.907Z
- Modified: 2026-09-18T20:05:53.723Z
- Also known as: GHSA-5qr2-v392-m9g8
- Weaknesses: CWE-79, CWE-116
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- swc-project swc: < 1.15.47
- @swc html: < 1.15.47-nightly-20260729.1
- swc-project swc_html_minifier: < 59.0.0
- @swc/html (npm): before 1.15.47-nightly-20260729.1
- swc_html_minifier (crates.io): before 59.0.0

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/swc-project/swc/security/advisories/GHSA-5qr2-v392-m9g8> (web)
- <https://github.com/swc-project/swc/pull/12080> (web)
- <https://github.com/swc-project/swc/commit/e1877b44bdac8abc9fd51e984d584f40f6999832> (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://nvd.nist.gov/vuln/detail/CVE-2026-72925> (advisory)
- <https://github.com/swc-project/swc> (package)

## Sources

- CVE List: [CVE-2026-72925](https://www.cve.org/CVERecord?id=CVE-2026-72925), CVE Terms of Use, modified 2026-08-11
- GitHub Advisory Database: [GHSA-5qr2-v392-m9g8](https://github.com/advisories/GHSA-5qr2-v392-m9g8), CC-BY-4.0, modified 2026-09-08
- NVD: [CVE-2026-72925](https://nvd.nist.gov/vuln/detail/CVE-2026-72925), Public domain, modified 2026-09-18

---

Page: https://cve.day/CVE-2026-72925 · Whole record: https://cve.day/CVE-2026-72925.json · Rebuilt by cve.day 2026-11-25T22:59:32.259Z
