CVE-2024-21541
MEDIUM 5.5CVSS 4.0dom-iterator code execution vulnerability
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.
- Published
- 13 Nov 2024
- Last modified
- 17 Jun 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-94
- Also known as
- GHSA-jrvm-mcxc-mf6m
- Sources
- NVDJSONOSV GHSA-jrvm-mcxc-mf6mJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | report@snyk.io (Secondary) | CVSS 4.0 | MEDIUM 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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | matthewmueller | dom-iteratorcpe:2.3:a:matthewmueller:dom-iterator:*:*:*:*:*:node.js:*:* |
<= 1.0.0 | |
| OSV | npm | dom-iterator | < 1.0.1 | 1.0.1 |
References
- https://github.com/matthewmueller/dom-iterator/commit/9e0e0fad5a251de5b42feb326c4204eb04080805 · WEB
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-8383166 · WEB
- https://security.snyk.io/vuln/SNYK-JS-DOMITERATOR-6157199 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-21541 · ADVISORY
- https://github.com/matthewmueller/dom-iterator · PACKAGE
History
- 25 Nov 2026 20:56 UTC · NVD: first stored (published 13 Nov 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 13 Nov 2024)