CVE-2024-21541
JSON

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 packageVersionsReported by
dom-iteratorbefore 1.0.1CVE List
org.webjars.npm:dom-iteratorbefore *CVE List
dom-iterator dom-iteratorbefore *CVE List
dom-iterator (npm)before 1.0.1GitHub Advisory Database
matthewmueller dom-iteratorup to 1.0.0NVD

All scores

snyk6.9medium CVSS:4.0CVSS: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
snyk7.3high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P
GitHub7.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
GitHubmedium CVSS:4.0CVSS: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
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-94

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

SourceRecordLicence
CVE ListCVE-2024-21541 changed 2025-01-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-jrvm-mcxc-mf6m changed 2025-01-14CC-BY-4.0
NVDCVE-2024-21541 changed 2026-06-17Public domain