CVE-2024-43788

MEDIUM

webpack < 5.94.0 - Cross-Site Scripting via DOM Clobbering in AutoPublicPathRuntimeModule

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2024-43788. PoCs published by batzionb.

AI-analyzed exploit summary This repository demonstrates a Cross-Site Scripting (XSS) vulnerability in Webpack's publicPath handling (CVE-2024-43788). The PoC includes a vulnerable website and a malicious server that exploits the vulnerability by injecting JavaScript via a crafted comment.

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.

Exploits (1)

nomisec WORKING POC
by batzionb · poc
https://github.com/batzionb/webpack-cve-2024-43788

This repository demonstrates a Cross-Site Scripting (XSS) vulnerability in Webpack's publicPath handling (CVE-2024-43788). The PoC includes a vulnerable website and a malicious server that exploits the vulnerability by injecting JavaScript via a crafted comment.

Classification
Working Poc 95%
Attack Type
Xss
Complexity
Moderate
Reliability
Reliable
Target: Webpack (versions with publicPath set to 'auto')
No auth needed
Prerequisites: Victim must visit the vulnerable website · Attacker must control a malicious server to host the XSS payload
devstral-2 · analyzed Feb 18, 2026 Full analysis →

References (5)

Core 5
Core References
Exploit, Third Party Advisory x_refsource_misc
https://research.securitum.com/xss-in-amp4email-dom-clobbering
Exploit, Mitigation, Technical Description, Third Party Advisory x_refsource_misc
https://scnps.co/papers/sp23_domclob.pdf

Scores

CVSS v3 6.4
EPSS 0.0152
EPSS Percentile 81.7%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact partial

Details

CWE
CWE-79
Status published
Products (2)
npm/webpack 5.0.0-alpha.0 - 5.94.0npm
webpack.js/webpack < 5.94.0
Published Aug 27, 2024
Tracked Since Feb 18, 2026