6.9medium
dom-iterator code execution vulnerability
- Severity
- 6.9medium CVSS:4.0 by snyk
- Exploit likelihood
- 1.08% (higher than 66% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- snyk
- Also known as
- GHSA-jrvm-mcxc-mf6m
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| dom-iterator | before 1.0.1 | CVE List |
| org.webjars.npm:dom-iterator | before * | CVE List |
| dom-iterator dom-iterator | before * | CVE List |
| dom-iterator (npm) | before 1.0.1 | GitHub Advisory Database |
| matthewmueller dom-iterator | up to 1.0.0 | NVD |
All scores
| snyk | 6.9medium 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 |
| snyk | 7.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P |
| GitHub | 7.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| GitHub | medium 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 | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
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.
NVD (es)
Todas las versiones del paquete dom-iterator son vulnerables a la ejecución de código arbitrario debido al uso del constructor Function sin una desinfección completa de la entrada. Function genera un nuevo cuerpo de función y, por lo tanto, se debe tener cuidado para garantizar que las entradas a Function no estén controladas por un atacante. Los riesgos involucrados son similares a los de permitir que la entrada controlada por un atacante llegue a eval.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-21541 changed 2025-01-16 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jrvm-mcxc-mf6m changed 2025-01-14 | CC-BY-4.0 |
| NVD | CVE-2024-21541 changed 2026-06-17 | Public domain |