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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | dom-iterator | 1.0.1 | GHSA-jrvm-mcxc-mf6m |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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