CVE-2024-21541 json
dom-iterator code execution vulnerability
published 2024-11-13 23 mo ago modified 2026-06-17 4 mo ago also GHSA-jrvm-mcxc-mf6m , EUVD-2024-3277
- cvss
- 7.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.1%
- EPSS 1.1% chance of exploitation in 30 days, percentile 65%
- public exploits
- 0
- none known
Summary
Versions of the package dom-iterator before 1.0.1 are vulnerable to Arbitrary Code Execution due to use of the Function constructor without complete input sanitization. Function generates a new function body and thus care must be given to ensure that the inputs to Function are not attacker-controlled. The risks involved are similar to that of allowing attacker-controlled input to reach eval.
Patch / fix
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-21541 updated cvss 9.8
dom-iterator: Arbitrary Code Execution in dom-iterator via Unsafe Function Constructor Use
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 23 mo ago
Exploit prediction
1.08% chance of exploitation in the next 30 days, higher than 65% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- security.snyk.io https://security.snyk.io/vuln/SNYK-JS-DOMITERATOR-6157199 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 6.9 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P |
| CNA | 3.1 | 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P |
| CNA | 4.0 | 5.5 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| CNA | 3.1 | 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | dom-iterator | <1.0.1 |
1.0.1 |
Affected products
- n/a dom-iterator
- n/a org.webjars.npm:dom-iterator
- dom-iterator dom-iterator
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
github.com
/matthewmueller/dom-iterator/commit/9e0e0fad5a251de5b42feb326c4204eb04080805
web
-
security.snyk.io
/vuln/SNYK-JS-DOMITERATOR-6157199
web, exploit, third-party-advisory
-
security.snyk.io
/vuln/SNYK-JAVA-ORGWEBJARSNPM-8383166
web
-
nvd.nist.gov
/vuln/detail/CVE-2024-21541
advisory
-
github.com
/matthewmueller/dom-iterator
package
Sources
- CVE List CVE-2024-21541
- GitHub Advisory GHSA-jrvm-mcxc-mf6m
- NVD CVE-2024-21541
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.