GHSA-mmqv-m45h-q2hp Sandbox Breakout / Arbitrary Code Execution in localeval
Attackers can execute arbitrary code by bypassing the sandbox in the localeval library via constructor access.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-mmqv-m45h-q2hp?
GHSA-mmqv-m45h-q2hp is a code injection vulnerability in localeval, published on 4 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
All versions of localeval are vulnerable to Sandbox Escape leading to Remote Code Execution. The package fails to restrict access to the main context through constructor.constructor. This may allow attackers to execute arbitrary code in the system. Evaluating the payload
constructor.constructor("return process.env")()
returns the contents of process.env.
Recommendation
No fix is currently available. Consider using an alternative package until a fix is made available.
Which versions are affected by GHSA-mmqv-m45h-q2hp?
2 open source packages ship an affected version, including localeval.
| Package | Affected | Fixed in |
|---|---|---|
localeval npm | All versions | 15.3.0 |
localeval npm | All versions | 15.3.0 |
How do I fix GHSA-mmqv-m45h-q2hp?
Upgrade localeval to 15.3.0 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is GHSA-mmqv-m45h-q2hp being exploited?
There is no known exploitation of GHSA-mmqv-m45h-q2hp in the wild and no public exploit code.