` sequence, the generated HTML could terminate\nthe containing script element early because HTML tokenization occurs before\nthe JSON is consumed.\n\nApplications t","image":"https://o3.security/opengraph.png","datePublished":"2026-09-08T17:58:00Z","dateModified":"2026-09-08T18:15:03.995774389Z","url":"https://o3.security/vulnerability/CVE-2026-72925","inLanguage":"en","author":{"@id":"https://o3.security/#organization"},"publisher":{"@id":"https://o3.security/#organization"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://o3.security/vulnerability/CVE-2026-72925"},"speakable":{"@type":"SpeakableSpecification","cssSelector":["h1",".vuln-summary",".vuln-severity",".vuln-mitigation"]},"about":[{"@type":"SoftwareApplication","name":"swc_html_minifier","applicationCategory":"crates.io","softwareVersion":"59.0.0"},{"@type":"SoftwareApplication","name":"@swc/html","applicationCategory":"npm","softwareVersion":"1.15.47-nightly-20260729.1"}],"citation":[{"@type":"CreativeWork","name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72925"},{"@type":"CreativeWork","name":"OSV.dev","url":"https://osv.dev/vulnerability/CVE-2026-72925"},{"@type":"CreativeWork","url":"https://github.com/swc-project/swc/security/advisories/GHSA-5qr2-v392-m9g8"},{"@type":"CreativeWork","url":"https://github.com/swc-project/swc/pull/12080"},{"@type":"CreativeWork","url":"https://github.com/swc-project/swc/commit/e1877b44bdac8abc9fd51e984d584f40f6999832"},{"@type":"CreativeWork","url":"https://github.com/swc-project/swc/releases/tag/v1.15.47"},{"@type":"CreativeWork","url":"https://github.com/swc-project/swc/releases/tag/v1.15.47-nightly-20260729.1"}]}` sequence, the generated HTML could terminate\nthe containing script element early because HTML tokenization occurs before\nthe JSON is consumed.\n\nApplications t","url":"https://o3.security/vulnerability/CVE-2026-72925","identifier":"CVE-2026-72925","datePublished":"2026-09-08T17:58:00Z","dateModified":"2026-09-08T18:15:03.995774389Z","inLanguage":"en","license":"https://creativecommons.org/licenses/by/4.0/","keywords":["CVE-2026-72925","MEDIUM severity","CWE-79","CWE-116","CVE","vulnerability","security advisory"],"creator":{"@id":"https://o3.security/#organization"},"isAccessibleForFree":true,"citation":[{"@type":"CreativeWork","name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72925"},{"@type":"CreativeWork","name":"OSV.dev","url":"https://osv.dev/vulnerability/CVE-2026-72925"}],"variableMeasured":[{"@type":"PropertyValue","name":"CVSS Base Score","value":6.1,"description":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"@type":"PropertyValue","name":"Severity","value":"MEDIUM"}]}` sequence, the generated HTML could terminate\nthe containing script element early because HTML tokenization occurs before\nthe JSON is consumed.\n\nApplications that minify HTML containing attacker-controlled JSON data could\ntherefore transform inert data into a"}},{"@type":"Question","name":"How severe is GHSA-5qr2-v392-m9g8?","acceptedAnswer":{"@type":"Answer","text":"GHSA-5qr2-v392-m9g8 has a CVSS score of 6.1/10, rated MEDIUM. Review your exposure and patch according to your risk tolerance."}},{"@type":"Question","name":"Which packages are affected by GHSA-5qr2-v392-m9g8?","acceptedAnswer":{"@type":"Answer","text":"GHSA-5qr2-v392-m9g8 affects the following packages: swc_html_minifier (crates.io), @swc/html (npm). Ecosystems affected: crates.io, npm."}},{"@type":"Question","name":"How do I fix GHSA-5qr2-v392-m9g8?","acceptedAnswer":{"@type":"Answer","text":"Update swc_html_minifier to 59.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5qr2-v392-m9g8 is resolved across your whole dependency graph."}},{"@type":"Question","name":"How do I detect GHSA-5qr2-v392-m9g8 in my crates.io, npm dependencies?","acceptedAnswer":{"@type":"Answer","text":"Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for swc_html_minifier. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match."}},{"@type":"Question","name":"How do I mitigate GHSA-5qr2-v392-m9g8 if there is no patch (or I can't update yet)?","acceptedAnswer":{"@type":"Answer","text":"If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands."}},{"@type":"Question","name":"How does O3 Security protect against GHSA-5qr2-v392-m9g8?","acceptedAnswer":{"@type":"Answer","text":"O3 pinpoints whether GHSA-5qr2-v392-m9g8 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed."}},{"@type":"Question","name":"Is GHSA-5qr2-v392-m9g8 actively exploited in the wild?","acceptedAnswer":{"@type":"Answer","text":"No public exploit code has been indexed for GHSA-5qr2-v392-m9g8 yet. This does not mean the vulnerability cannot be exploited — absence of public exploits does not imply safety. Apply the recommended fix and use O3 Security to monitor your exposure."}},{"@type":"Question","name":"What type of vulnerability is GHSA-5qr2-v392-m9g8?","acceptedAnswer":{"@type":"Answer","text":"GHSA-5qr2-v392-m9g8 is classified as Cross-site Scripting (XSS) (CWE-79), CWE-116 (CWE-116). These weakness types describe the underlying flaw category, which helps determine the potential impact and the right class of mitigation. This is a high-impact weakness class that often enables remote code execution or data exposure."}},{"@type":"Question","name":"When was GHSA-5qr2-v392-m9g8 published, and has it been updated?","acceptedAnswer":{"@type":"Answer","text":"GHSA-5qr2-v392-m9g8 was published on September 8, 2026 and was last updated on September 8, 2026. Advisory data evolves as severity scores, affected ranges, and exploit intelligence are revised — always check the latest version of the advisory before acting."}}]}
Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🦀
🦀 crates.io📦 npm
Not in CISA KEV
MEDIUM severity

GHSA-5qr2-v392-m9g8

MEDIUMFix: swc-project/swc#12080

GHSA-5qr2-v392-m9g8 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in swc_html_minifier. O3 Security confirms whether GHSA-5qr2-v392-m9g8 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

SWC HTML minifier may allow script element breakout when minifying embedded JSON

Also known asCVE-2026-72925
Published
Sep 8, 2026
Updated
Sep 8, 2026
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Sep 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-5qr2-v392-m9g8.

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

15other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@swc/htmlnpm
391Kdownloads / week

Description

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:

await minify(html, {
  minifyJson: false,
});

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.ioswc_html_minifierall versions59.0.0
📦npm@swc/htmlall versions1.15.47-nightly-20260729.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for swc_html_minifier. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update swc_html_minifier to 59.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5qr2-v392-m9g8 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-5qr2-v392-m9g8 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-5qr2-v392-m9g8. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## 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 a
O3 Security · Impact-Aware SCA

Is GHSA-5qr2-v392-m9g8 in your dependencies?

O3 detects GHSA-5qr2-v392-m9g8 across crates.io, npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.