Skip to main content
EPSS 0.7%top 47%

DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS (CVE-2024-47068)

0
Medium
Published: 08/13/2026 (08/13/2026, 17:32:32 UTC)
Source: GCVE Database
Product: rollup

Description

A DOM Clobbering vulnerability (CVE-2024-47068) exists in rollup bundled scripts when using import.meta.url with output formats cjs, umd, or iife. This vulnerability allows an attacker to manipulate document.currentScript by injecting scriptless HTML elements with a name attribute of 'currentScript', leading to cross-site scripting (XSS) by loading attacker-controlled scripts. The issue arises because rollup replaces import.meta.url with a URL derived from document.currentScript without verifying the element's tag name. A patch is available that adds type checking to ensure the element is a SCRIPT tag before using its src attribute. The vulnerability affects rollup versions >=2.56.3 and <4.22.4 and has a CVSS 3.1 score of 6.4 (medium severity).

CVSS v3.1

Score 6.4medium

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H

Affected software

Homebrewmore threats →ghsa
rollup
pkg:brew/rollup
Affected versions
>=2.56.3 <4.22.4

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/04/2026, 12:28:55 UTC

Technical Analysis

The vulnerability is a DOM Clobbering gadget in rollup's bundled scripts when using import.meta.url in cjs, umd, or iife output formats. Rollup replaces import.meta.url with a URL derived from document.currentScript.src, but this lookup can be shadowed by an attacker via named DOM elements (e.g., an img tag with name='currentScript'). This allows an attacker to control the URL used for script loading, enabling XSS. The vulnerability is demonstrated by injecting an img tag with name='currentScript' and a malicious src, causing the page to load scripts from an attacker-controlled server. The issue is mitigated by patching rollup to verify that document.currentScript is a SCRIPT element before using its src attribute.

Potential Impact

This vulnerability can lead to cross-site scripting (XSS) attacks on websites that include rollup-bundled scripts configured with cjs, umd, or iife output formats and use import.meta.url, if those websites allow injection of scriptless HTML elements with unsanitized name or id attributes. Exploitation enables attackers to load and execute arbitrary scripts from attacker-controlled domains, potentially compromising the confidentiality, integrity, and availability of affected web applications.

Mitigation Recommendations

A patch is available for rollup that adds type checking to ensure document.currentScript is a SCRIPT element before using its src attribute, preventing DOM Clobbering attacks. Users should upgrade rollup to a fixed version >=4.22.4. Until patched, avoid allowing untrusted user input to inject HTML elements with name or id attributes that could shadow document.currentScript. Follow the vendor advisory for the official fix and update instructions.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
BREW-rollup-CVE-2024-47068
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
3.1

Threat ID: 6ac2458012601ec6a3164066

Added to database: 10/04/2026, 12:24:32 UTC

Last enriched: 10/04/2026, 12:28:55 UTC

Last updated: 10/04/2026, 16:08:31 UTC

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses