CVE-2024-21541

HIGH
Published Nov 13, 2024 Modified Apr 29, 2026 CWE-94

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.

Is your site exposed to CVE-2024-21541?

Run a free security scan — no signup, results in seconds.

CVSS v3.1 Score

7.3
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Weakness Type (CWE)

CWE-94 CWE-94

Affected Products

Vendor Product
matthewmueller dom-iterator

References

Frequently Asked Questions

What is CVE-2024-21541? +
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. It has a CVSS v3.1 base score of 7.3 (HIGH).
How severe is CVE-2024-21541? +
CVE-2024-21541 has a CVSS v3.1 score of 7.3 out of 10, rated HIGH. This is a high-severity vulnerability that should be prioritized for patching.
What products are affected by CVE-2024-21541? +
CVE-2024-21541 affects products from matthewmueller, specifically: dom-iterator. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2024-21541? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2024-21541 — free, no signup required.