Code injection in dom-iterator
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Code execution
- Confidentiality · integrity · availability
- Low · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | dom-iterator | before 1.0.1 | 1.0.1 | Patch available | CNA |
| — | org.webjars.npm:dom-iterator | all versions | — | No fix listed | CNA |
| — | dom-iterator (npm) | before 1.0.1 | 1.0.1 | Patch available | GHSA-jrvm-mcxc-mf6m |
- dom-iterator Vendor— Affected before 1.0.1 Fixed in 1.0.1 Patch available CNA
- org.webjars.npm:dom-iterator Vendor— Affected all versions Fixed in — No fix listed CNA
- dom-iterator (npm) Vendor— Affected before 1.0.1 Fixed in 1.0.1 Patch available GHSA-jrvm-mcxc-mf6m
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:matthewmueller:dom-iterator:*:*:*:*:*:node.js:*:* | up to 1.0.0 | Vulnerable | Matthewmueller |
- cpe:2.3:a:matthewmueller:dom-iterator:*:*:*:*:*:node.js:*:* Versions up to 1.0.0 Vulnerable ·Matthewmueller
Remediation
- Fix · CNA dom-iterator Fixed in 1.0.1
- Fix · GHSA-jrvm-mcxc-mf6m dom-iterator (npm) Fixed in 1.0.1 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2024-21541
- 2026-10-03 Alias added: GHSA-jrvm-mcxc-mf6m
References
Sources
- CVE-2024-21541 · CVE Program
- CVE-2024-21541 · NVD
- FIRST EPSS
- GHSA-jrvm-mcxc-mf6m · GitHub Advisory Database · CC BY 4.0
- CVE-2024-21541 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences