{"id":"CVE-2026-72925","published":"2026-08-11T14:45:12Z","modified":"2026-08-11T18:26:38Z","title":"SWC HTML minifier may allow script element breakout when minifying embedded JSON","vendor":"swc-project","product":"swc","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00338,"percentile":0.19692,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/swc-project/swc/security/advisories/GHSA-5qr2-v392-m9g8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/swc-project/swc/pull/12080","tags":["x_refsource_MISC"]},{"url":"https://github.com/swc-project/swc/commit/e1877b44bdac8abc9fd51e984d584f40f6999832","tags":["x_refsource_MISC"]},{"url":"https://github.com/swc-project/swc/releases/tag/v1.15.47","tags":["x_refsource_MISC"]},{"url":"https://github.com/swc-project/swc/releases/tag/v1.15.47-nightly-20260729.1","tags":["x_refsource_MISC"]}],"priority":{"score":8.2,"factors":[{"name":"EPSS percentile","points":3.94},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"swc-project","affectedVersions":[{"vendor":"swc-project","product":"swc","versions":["< 1.15.47"]},{"vendor":"@swc","product":"html","versions":["< 1.15.47-nightly-20260729.1"]},{"vendor":"swc-project","product":"swc_html_minifier","versions":["< 59.0.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-08-11T18:26:27.962954Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@swc/html","vulnerableRanges":["<1.15.47-nightly-20260729.1"],"patched":["1.15.47-nightly-20260729.1"],"from":["GHSA-5qr2-v392-m9g8"],"provenance":"source"},{"ecosystem":"crates.io","package":"swc_html_minifier","vulnerableRanges":["<59.0.0"],"patched":["59.0.0"],"from":["GHSA-5qr2-v392-m9g8"],"provenance":"source"}],"summary":{"text":"The SWC HTML minifier (the minifyJson processing in swc_html_minifier, as used in @swc/html) fails to re-escape less-than signs when minifying JSON inside application/json and application/ld+json script elements, so attacker-controlled JSON can contain a closing script sequence that ends the element early. An attacker can exploit this by supplying such JSON through a user-interaction-dependent path, such as a victim viewing or navigating to the affected generated page, which then executes script in that page's origin.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:05:34Z"},"euvd":{"id":"EUVD-2026-56179","exploited":false,"provenance":"source"}}