6.4
MEDIUM
CVE-2024-43788
WebPack DOM Clobbering XSS Vulnerability
Description

Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. The webpack developers have discovered a DOM Clobbering vulnerability in Webpack’s `AutoPublicPathRuntimeModule`. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an `img` tag with an unsanitized `name` attribute) are present. Real-world exploitation of this gadget has been observed in the Canvas LMS which allows a XSS attack to happen through a javascript code compiled by Webpack (the vulnerable part is from Webpack). DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. This vulnerability can lead to cross-site scripting (XSS) on websites that include Webpack-generated files and allow users to inject certain scriptless HTML tags with improperly sanitized name or id attributes. This issue has been addressed in release version 5.94.0. All users are advised to upgrade. There are no known workarounds for this issue.

INFO

Published Date :

Aug. 27, 2024, 5:15 p.m.

Last Modified :

Sept. 3, 2024, 3:15 p.m.

Remotely Exploitable :

Yes !

Impact Score :

4.7

Exploitability Score :

1.6
Affected Products

The following products are affected by CVE-2024-43788 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Webpack.js webpack
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2024-43788.

URL Resource
https://github.com/webpack/webpack/commit/955e057abc6cc83cbc3fa1e1ef67a49758bf5a61 Patch
https://github.com/webpack/webpack/issues/18718#issuecomment-2326296270
https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986 Exploit Vendor Advisory
https://research.securitum.com/xss-in-amp4email-dom-clobbering Exploit Third Party Advisory
https://scnps.co/papers/sp23_domclob.pdf Exploit Mitigation Technical Description Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-43788 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-43788 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    Sep. 03, 2024

    Action Type Old Value New Value
    Added Reference GitHub, Inc. https://github.com/webpack/webpack/issues/18718#issuecomment-2326296270 [No types assigned]
  • Initial Analysis by [email protected]

    Aug. 30, 2024

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    Changed Reference Type https://github.com/webpack/webpack/commit/955e057abc6cc83cbc3fa1e1ef67a49758bf5a61 No Types Assigned https://github.com/webpack/webpack/commit/955e057abc6cc83cbc3fa1e1ef67a49758bf5a61 Patch
    Changed Reference Type https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986 No Types Assigned https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986 Exploit, Vendor Advisory
    Changed Reference Type https://research.securitum.com/xss-in-amp4email-dom-clobbering No Types Assigned https://research.securitum.com/xss-in-amp4email-dom-clobbering Exploit, Third Party Advisory
    Changed Reference Type https://scnps.co/papers/sp23_domclob.pdf No Types Assigned https://scnps.co/papers/sp23_domclob.pdf Exploit, Mitigation, Technical Description, Third Party Advisory
    Added CWE NIST CWE-79
    Added CPE Configuration OR *cpe:2.3:a:webpack.js:webpack:*:*:*:*:*:node.js:*:* versions up to (excluding) 5.94.0
  • CVE Received by [email protected]

    Aug. 27, 2024

    Action Type Old Value New Value
    Added Description Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. The webpack developers have discovered a DOM Clobbering vulnerability in Webpack’s `AutoPublicPathRuntimeModule`. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an `img` tag with an unsanitized `name` attribute) are present. Real-world exploitation of this gadget has been observed in the Canvas LMS which allows a XSS attack to happen through a javascript code compiled by Webpack (the vulnerable part is from Webpack). DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. This vulnerability can lead to cross-site scripting (XSS) on websites that include Webpack-generated files and allow users to inject certain scriptless HTML tags with improperly sanitized name or id attributes. This issue has been addressed in release version 5.94.0. All users are advised to upgrade. There are no known workarounds for this issue.
    Added Reference GitHub, Inc. https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986 [No types assigned]
    Added Reference GitHub, Inc. https://github.com/webpack/webpack/commit/955e057abc6cc83cbc3fa1e1ef67a49758bf5a61 [No types assigned]
    Added Reference GitHub, Inc. https://research.securitum.com/xss-in-amp4email-dom-clobbering [No types assigned]
    Added Reference GitHub, Inc. https://scnps.co/papers/sp23_domclob.pdf [No types assigned]
    Added CWE GitHub, Inc. CWE-79
    Added CVSS V3.1 GitHub, Inc. AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-43788 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2024-43788 weaknesses.

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability