Skip to content
OpenAdvisories
Critical GHSA-mmqv-m45h-q2hp

Sandbox Breakout / Arbitrary Code Execution in localeval

Published Sep 4, 2020 · Updated Feb 3, 2026 · Assigned by GHSA

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.

Affected packages

EcosystemPackageAffectedFixedRecord
npm localeval < 15.3.0 15.3.0 GHSA-mmqv-m45h-q2hp

References