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.
{
"unresolved_ranges": [
{
"extracted_events": [
{
"fixed": "*"
}
],
"source": "AFFECTED_FIELD"
}
],
"cwe_ids": [
"CWE-94"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21541.json",
"cna_assigner": "snyk"
}{
"cpe": "cpe:2.3:a:matthewmueller:dom-iterator:*:*:*:*:*:node.js:*:*",
"extracted_events": [
{
"introduced": "0"
},
{
"last_affected": "1.0.0"
}
],
"source": [
"CPE_RANGE",
"REFERENCES"
]
}