Skip to main content
EPSS 0.3%top 75%

CVE-2026-72925: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in swc-project swc

0
Medium
VulnerabilityCVE-2026-72925cvecve-2026-72925cwe-79cwe-116
Published: 08/11/2026 (08/11/2026, 14:45:12 UTC)
Source: CVE Database V5
Vendor/Project: swc-project
Product: 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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected software

swc-project

swc

Affected versions
<1.15.47

@swc

html

Affected versions
<1.15.47-nightly-20260729.1

swc-project

swc_html_minifier

Affected versions
<59.0.0
crates.iomore threats →ai
swc_html_minifier
pkg:cargo/swc_html_minifier
Affected versions
<59.0.0

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

AILast updated: 08/11/2026, 16:03:42 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses