CVE-2022-25904 Prototype Pollution
Attackers can pollute Object.prototype via safeEval, potentially leading to code execution or privilege escalation in applications using this library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2022-25904?
CVE-2022-25904 is a high-severity code injection vulnerability in safe-eval, published on 21 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
All versions of package safe-eval are vulnerable to Prototype Pollution which allows an attacker to add or modify properties of the Object.prototype.Consolidate when using the function safeEval. This is because the function uses vm variable, leading an attacker to modify properties of the Object.prototype.
Weakness: CWE-1321
Which versions are affected by CVE-2022-25904?
2 open source packages ship an affected version, including safe-eval. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
safe-eval npm | All versions to 0.4.1 | None |
safe-eval npm | All versions to 0.4.1 | None |
Products include Safe-Eval Project Safe-Eval.
How do I fix CVE-2022-25904?
No fix has been published for CVE-2022-25904 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2022-25904 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-25904 exists.
Other vulnerabilities in safe-eval
Sources
Also known as GHSA-33vh-7x8q-mg35.