CVE-2023-26122 safe-eval vulnerable to Sandbox Bypass due to improper input sanitization

High 8.8 Published Updated

Attackers can bypass the safe-eval sandbox via prototype pollution to achieve remote code execution in applications using this library.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2023-26122?

CVE-2023-26122 is a high-severity code injection vulnerability in safe-eval, published on 11 Apr 2023. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

All versions of the package safe-eval are vulnerable to Sandbox Bypass due to improper input sanitization. The vulnerability is derived from prototype pollution exploitation. Exploiting this vulnerability might result in remote code execution ("RCE"). **Vulnerable functions:** __defineGetter__, stack(), toLocaleString(), propertyIsEnumerable.call(), valueOf().

Weakness: CWE-1321, CWE-265

Which versions are affected by CVE-2023-26122?

2 open source packages ship an affected version, including safe-eval. It affects 1 product.

PackageAffectedFixed in
safe-eval npmAll versions to 0.4.2None
safe-eval npmAll versions to 0.4.2None

Products include Safe-Eval Project Safe-Eval.

How do I fix CVE-2023-26122?

No fix has been published for CVE-2023-26122 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-2023-26122 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-26122 exists.

Sources

Also known as GHSA-79xf-67r4-q2jj.

Is CVE-2023-26122 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free