# GHSA-mmqv-m45h-q2hp: Sandbox Breakout / Arbitrary Code Execution in localeval

- Severity: Critical (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-09-04T15:22:40.000Z
- Modified: 2026-02-03T03:17:19.972Z

## 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.

(As written by GitHub Advisory Database.)

## Affected

- localeval (npm): before 15.3.0

## References

- <https://github.com/espadrine/localeval/issues/9> (web)
- <https://github.com/espadrine/localeval/commit/823f112c793b8fae051eeddad61d4ed29804a56c> (web)
- <https://github.com/espadrine/localeval/commit/ce985eba77a5f89a7f718727cbaa7fb14da40335> (web)
- <https://github.com/espadrine/localeval> (package)

## Sources

- GitHub Advisory Database: [GHSA-mmqv-m45h-q2hp](https://github.com/advisories/GHSA-mmqv-m45h-q2hp), CC-BY-4.0, modified 2026-02-03

---

Page: https://cve.day/GHSA-mmqv-m45h-q2hp · Whole record: https://cve.day/GHSA-mmqv-m45h-q2hp.json · Rebuilt by cve.day 2026-11-25T22:56:45.973Z
