Vulnerability DatabaseGHSA-84jw-g43v-8gjm

GHSA-84jw-g43v-8gjm
JavaScript vulnerability analysis and mitigation

Overview

A DOM Clobbering vulnerability was discovered in Rspack's AutoPublicPathRuntimeModule (GHSA-84jw-g43v-8gjm, CVE-2024-43788) affecting versions < 1.0.0-rc.1. The vulnerability was found in the automatic public path resolution mechanism when the output.publicPath configuration is not set or is set to 'auto'. This moderate severity vulnerability (CVSS score 6.4) was disclosed on September 19, 2024, and affects the npm package @rspack/core (GitHub Advisory).

Technical details

The vulnerability exists in the AutoPublicPathRuntimeModule where the document.currentScript lookup can be shadowed by an attacker-controlled HTML element. When the publicPath is set to 'auto' or not set, the generated bundle code attempts to dynamically resolve and load additional JavaScript files. An attacker can exploit this by inserting an img tag with a name attribute set to currentScript, causing the src attribute of the attacker-controlled element to be used as the scriptUrl and assigned to webpack_require.p. This vulnerability has been assigned a CVSS v3.1 score of 6.4 (AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H) (GitHub Advisory).

Impact

The vulnerability can lead to cross-site scripting (XSS) attacks on websites that include Webpack-generated files and allow users to inject certain scriptless HTML tags with improperly sanitized name or id attributes. If exploited, it could result in arbitrary script loading from an attacker's server, potentially leading to severe security risks. The vulnerability has been confirmed to have real-world exploitation potential in the Canvas LMS (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 1.0.0-rc.1 of @rspack/core. The fix involves adding a check for the currentScript's tagName to ensure it is actually a SCRIPT element, similar to the approach used in the Google Closure project. Users should upgrade to the patched version to prevent potential exploitation (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-55182CRITICAL10
  • JavaScriptJavaScript
  • react
NoYesDec 03, 2025
CVE-2025-66401CRITICAL9.8
  • JavaScriptJavaScript
  • mcp-watch
NoNoDec 01, 2025
CVE-2025-66412HIGH8.5
  • JavaScriptJavaScript
  • @angular/compiler
NoYesDec 01, 2025
CVE-2025-66415MEDIUM6.9
  • JavaScriptJavaScript
  • @fastify/reply-from
NoYesDec 01, 2025
CVE-2025-66405MEDIUM6.9
  • JavaScriptJavaScript
  • @portkey-ai/gateway
NoYesDec 01, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management