` 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","name":"FIRST.org EPSS","url":"https://www.first.org/epss/api-data?cve=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"},{"@type":"CreativeWork","name":"FIRST.org EPSS","url":"https://www.first.org/epss/api-data?cve=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"},{"@type":"PropertyValue","name":"EPSS Percentile","value":26}]}` 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, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version."}},{"@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":"Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page."}},{"@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 is the EPSS score for GHSA-5qr2-v392-m9g8?","acceptedAnswer":{"@type":"Answer","text":"GHSA-5qr2-v392-m9g8 has an EPSS (Exploit Prediction Scoring System) score of 0.3%, placing it in the 26th percentile of all CVEs. EPSS is maintained by FIRST.org and estimates the probability that a vulnerability will be exploited in the wild within the next 30 days. This score indicates relatively lower exploitation probability, though the CVSS severity should still guide your patching priority."}},{"@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

SWC HTML minifier may allow script element breakout when minifying embedded JSONGHSA-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. A fix is available for swc_html_minifier — see the affected versions and patch details below.

Also known asCVE-2026-72925
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Oct 23, 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.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs26th percentile — riskier than 26% of all scored CVEsHighest risk
0.00%0.28%0.56%0.84%0.2%0.3%0.3%Sep 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-5qr2-v392-m9g8 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

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.

16other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@swc/htmlnpm
285Kdownloads / 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.0cargo update -p swc_html_minifier --precise 59.0.0
📦npm@swc/htmlall versions1.15.47-nightly-20260729.1npm install @swc/html@1.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, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  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

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

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?

Find it across crates.io, npm, including transitive dependencies.

SWC HTML minifier may allow script element breakout…