CVE-2026-72925: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in swc-project swc
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.
AI Analysis
Technical Summary
The vulnerability exists in the minifyJson processing of the swc_html_minifier crate used by the swc-project. Prior to version 59.0.0, the component parses and serializes attacker-controlled JSON in application/json and application/ld+json script elements without applying the escape_json_for_html_script behavior. This omission allows less-than signs to remain unescaped, enabling a closing script sequence to terminate the script element prematurely and execute arbitrary script in the context of the generated page. The issue is addressed by properly escaping JSON content in swc_html_minifier 59.0.0 and later.
Potential Impact
An attacker can exploit this vulnerability to inject and execute arbitrary scripts in the origin of the affected web page, potentially leading to information disclosure or manipulation of the page content. The CVSS 3.1 base score is 6.1 (medium), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, scope changed, and low impact on confidentiality and integrity with no impact on availability.
Mitigation Recommendations
A fix is available in swc_html_minifier version 59.0.0. Users should upgrade to this version or later to remediate the vulnerability. No additional mitigation steps are indicated by the vendor advisory.
CVE-2026-72925: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in swc-project swc
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.
CVSS v3.1
Score 6.1medium
Affected software
swc-project
swc
@swc
html
swc-project
swc_html_minifier
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the minifyJson processing of the swc_html_minifier crate used by the swc-project. Prior to version 59.0.0, the component parses and serializes attacker-controlled JSON in application/json and application/ld+json script elements without applying the escape_json_for_html_script behavior. This omission allows less-than signs to remain unescaped, enabling a closing script sequence to terminate the script element prematurely and execute arbitrary script in the context of the generated page. The issue is addressed by properly escaping JSON content in swc_html_minifier 59.0.0 and later.
Potential Impact
An attacker can exploit this vulnerability to inject and execute arbitrary scripts in the origin of the affected web page, potentially leading to information disclosure or manipulation of the page content. The CVSS 3.1 base score is 6.1 (medium), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, scope changed, and low impact on confidentiality and integrity with no impact on availability.
Mitigation Recommendations
A fix is available in swc_html_minifier version 59.0.0. Users should upgrade to this version or later to remediate the vulnerability. No additional mitigation steps are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-10T17:57:26.144Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a7b3853bf8831d539e79e4a
Added to database: 08/11/2026, 14:57:23 UTC
Last enriched: 08/11/2026, 16:03:42 UTC
Last updated: 09/25/2026, 13:47:48 UTC
Views: 61
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.