Vulnerability · Published Nov 13, 2024 · Assigned by snyk

CVE-2024-21541

High 7.3

In plain English

A high-severity code injection in dom-iterator. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 65% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.3High
Exploit odds (30 days)1.1%top 34.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
npmdom-iterator1.0.1GHSA-jrvm-mcxc-mf6m

Affected products (as reported)

VendorProductVersions
n/a dom-iterator 0 – before 1.0.1
n/a org.webjars.npm:dom-iterator 0 – before *

Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P

References