CVE-2024-47068
JavaScript vulnerability analysis and mitigation

Overview

Rollup, a JavaScript module bundler, was found to contain a DOM Clobbering vulnerability in versions prior to 2.79.2, 3.29.5, and 4.22.4. The vulnerability affects scripts bundled with properties from import.meta (e.g., import.meta.url) in cjs/umd/iife format (GitHub Advisory).

Technical details

The vulnerability stems from improper handling of document.currentScript lookups in the bundled output. When bundling scripts that use import.meta properties, Rollup replaces these with URLs retrieved from document.currentScript. However, this implementation is vulnerable to DOM Clobbering attacks where an attacker can shadow the document.currentScript lookup through the browser's named DOM tree element access mechanism. The vulnerability has been assigned a CVSS v3.1 base score of 6.1 MEDIUM (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) (NVD).

Impact

The vulnerability can lead to cross-site scripting (XSS) attacks in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present. This allows attackers to potentially load scripts from attacker-controlled servers by manipulating the src attribute of the controlled element (GitHub Advisory).

Exploitability

Exploitation requires the presence of attacker-controlled HTML elements on the webpage. This can occur through website features that allow users to embed certain script-less HTML (such as markdown renderers, web email clients, forums) or via HTML injection vulnerabilities in third-party JavaScript loaded on the page (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in versions 2.79.2, 3.29.5, and 4.22.4. The fix includes adding type checking to prevent DOM Clobbering attacks by verifying that document.currentScript is actually a script element using tagName.toUpperCase() === 'SCRIPT' check (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-2026-55157HIGH8.4
  • JavaScript logoJavaScript
  • @ooples/token-optimizer-mcp
NoYesAug 14, 2026
CVE-2026-35219HIGH7.1
  • JavaScript logoJavaScript
  • @budibase/server
NoYesAug 14, 2026
CVE-2026-55156MEDIUM5.3
  • JavaScript logoJavaScript
  • @ooples/token-optimizer-mcp
NoYesAug 14, 2026
CVE-2026-50029MEDIUM5.3
  • JavaScript logoJavaScript
  • js-toml
NoYesAug 14, 2026
CVE-2026-73428MEDIUM4.6
  • JavaScript logoJavaScript
  • trix
NoYesAug 13, 2026

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