CVE-2024-21541
published medium CVSS 4.0 · 6.9dom-iterator: Arbitrary Code Execution in dom-iterator via Unsafe Function Constructor Use
Package status and fixes
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.9 / 10
- Severity
- medium
- Provider
- snyk · cna
- Vector string
- 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
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.3 | high | snyk · cna | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | dom-iterator | 0 to < 1.0.1 (affected · semver) | snyk · cna |
| n/a | org.webjars.npm:dom-iterator | 0 and later (affected · semver) | snyk · cna |
| dom-iterator | dom-iterator | 0 and later (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-94 Arbitrary Code Execution
References
3Provider assertions
2snyk · cna
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 173a32ed0c16cda0f2a1ddf2f500c2120909d505751f63da4c1ac9f3f69cad8d
- Ingested
- 23 Sep 2026, 08:19:02 UTC
- Source record
- Official CVE record