{"answers":{"affected":"2 open source packages ship an affected version, including webpack. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-43788 exists.","fix":"Upgrade webpack to 5.94.0 or later.","what":"CVE-2024-43788 is a medium-severity cross-site scripting vulnerability in webpack, published on 27 Aug 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-43788 and fix it if it is affected.\n\nWhat it is: CVE-2024-43788 is a medium-severity cross-site scripting vulnerability in webpack, published on 27 Aug 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-43788 exists.\n\nAffected packages and fixed versions:\n- webpack (npm): affected from 5.0.0-alpha.0; fixed in 5.94.0\n- webpack (npm): affected from 5.0.0-alpha.0; fixed in 5.94.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-43788/ (Markdown: https://insights.sbomify.com/CVE-2024-43788/index.md)","id":"CVE-2024-43788","markdown":"https://insights.sbomify.com/CVE-2024-43788/index.md","name":"CVE-2024-43788","record":{"aliases":["AZL-48365","CLSA-2026-1775089642","CLSA-2026-1775089643","DEBIAN-CVE-2024-43788","GHSA-4vvj-4cpr-p986","MINI-rrq4-6v4h-4rq9","ROOT-APP-NPM-CVE-2024-43788","UBUNTU-CVE-2024-43788","openSUSE-SU-2024:14330-1","openSUSE-SU-2025:15020-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript module bundler","requires_auth":"low_privilege","summary":"An attacker can execute arbitrary JavaScript via DOM clobbering in Webpack-generated code if user-controlled HTML is present.","user_interaction":"not_required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"webpack","vendor":"webpack.js"}],"cvss":{"score":6.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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.","ecosystems":["npm","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":"2025-05-12","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-05-12T08:35:14Z","kind":"github_poc","ref":"https://github.com/batzionb/webpack-cve-2024-43788","stars":0,"title":null}],"tier":"weaponised"},"has_fix":true,"headline":"DOM Clobbering Gadget found in Webpack's AutoPublicPathRuntimeModule that leads to Cross-site Scripting (XSS)","id":"CVE-2024-43788","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":4,"n_references":5,"next":{"headline":"Denial of service by the absence of restrictions on replies to posts in Discourse","id":"CVE-2024-43789"},"packages":[{"ecosystem":"npm","fixed":["5.94.0"],"introduced":["5.0.0-alpha.0"],"last_affected":[],"package":"webpack","purl":null,"source":"GHSA-4vvj-4cpr-p986"},{"ecosystem":"npm","fixed":["5.94.0"],"introduced":["5.0.0-alpha.0"],"last_affected":[],"package":"webpack","purl":"pkg:npm/webpack","source":"GHSA-4vvj-4cpr-p986"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["8.0.3-1.1"],"introduced":["0"],"last_affected":[],"package":"forgejo","purl":"pkg:rpm/opensuse/forgejo\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14330-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.29.5-1.1"],"introduced":["0"],"last_affected":[],"package":"rollup","purl":"pkg:rpm/opensuse/rollup\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2025:15020-1"}],"prev":{"headline":"Hono CSRF middleware can be bypassed using crafted Content-Type header","id":"CVE-2024-43787"},"products":["webpack"],"published":"2024-08-27","related":[{"cvss_score":9.8,"headline":"Cross-realm object access in Webpack 5","id":"CVE-2023-28154","kev_date_added":null,"published":"2023-03-13"},{"cvss_score":3.7,"headline":"webpack buildHttp HttpUriPlugin allowedUris bypass via HTTP redirects","id":"CVE-2025-68157","kev_date_added":null,"published":"2026-02-05"},{"cvss_score":3.7,"headline":"webpack buildHttp: allowedUris allow-list bypass via URL userinfo (@) leading to build-time SSRF behavior","id":"CVE-2025-68458","kev_date_added":null,"published":"2026-02-05"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-01-09","vendors":["webpack"]},"summary":"An attacker can execute arbitrary JavaScript via DOM clobbering in Webpack-generated code if user-controlled HTML is present.","url":"https://insights.sbomify.com/CVE-2024-43788/"}