CVE-2020-7710
Sandbox Breakout / Arbitrary Code Execution in safe-eval
Description
All versions of `safe-eval` are vulnerable to Sandbox Escape leading to Remote Code Execution. The package fails to restrict access to the main context through Error objects. This may allow attackers to execute arbitrary code in the system. Evaluating the payload ```js (function (){ var ex = new Error ex.__proto__ = null ex.stack = { match: x => { return x.constructor.constructor("throw process.env")() } } return ex })() ``` prints the contents of `process.env`. ## Recommendation No fix is currently available. Consider using an alternative package until a fix is made available.
How to fix CVE-2020-7710
No fixed version has been published yet. Mitigate by removing the affected package or applying upstream guidance from the references below.
- —no fix listed
Is CVE-2020-7710 being exploited?
Low — EPSS is 0.5%, meaning exploitation activity has not been observed at scale.
Affected packages (1)
- from 0, <= 0.4.1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | CRITICAL9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |