{"id":"CVE-2017-16088","aliases":["EUVD-2018-0337","GHSA-ww6v-677g-p656"],"status":"published","title":"Sandbox Breakout in safe-eval","description":"The safe-eval module describes itself as a safer version of eval. By accessing the object constructors, un-sanitized user input can access the entire standard library and effectively break out of the sandbox.","severity":{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-07","score":0.03441,"percentile":0.89053,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":false},"cwes":["CWE-610"],"published":"2018-06-07T02:00:00Z","modified":"2026-10-20T10:48:16Z","exploits":[{"source":"pocgithub","id":"Flyy-yu/CVE-2017-16088","title":"Flyy-yu/CVE-2017-16088","date":"2019-08-18","url":"https://github.com/Flyy-yu/CVE-2017-16088"}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"safe-eval","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.3.0"}]}]},{"source":"osv","ecosystem":"npm","package":"safe-eval","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.3.0"}]}]}],"products":[{"vendor":"hackerone","product":"safe-eval node module"},{"vendor":"safe-eval_project","product":"safe-eval"}],"references":[{"url":"https://github.com/patriksimek/vm2/issues/59","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/hacksparrow/safe-eval/issues/5","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nodesecurity.io/advisories/337","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2017-16088","tags":["advisory"]},{"url":"https://github.com/hacksparrow/safe-eval/pull/13","tags":["web"]},{"url":"https://github.com/advisories/GHSA-ww6v-677g-p656","tags":["advisory"]},{"url":"https://www.npmjs.com/advisories/337","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2017-16088","description":"The safe-eval module describes itself as a safer version of eval. By accessing the object constructors, un-sanitized user input can access the entire standard library and effectively break out of the sandbox.","status":"published","published":"2018-06-07T02:00:00Z","modified":"2024-09-16T16:13:38.445Z","cwes":["CWE-610"],"updated_at":"2026-11-02T14:33:21.453505Z"}],"euvd":[{"id":"EUVD-2018-0337","description":"The safe-eval module describes itself as a safer version of eval. By accessing the object constructors, un-sanitized user input can access the entire standard library and effectively break out of the sandbox.","status":"published","published":"2018-06-07T02:00:00Z","modified":"2024-09-16T16:13:38Z","updated_at":"2026-11-03T00:55:53.554412Z"}],"ghsa":[{"id":"GHSA-ww6v-677g-p656","title":"Sandbox Breakout in safe-eval","description":"Affected versions of `safe-eval` are vulnerable to a sandbox escape. By accessing object constructors, un-sanitized user input can access the entire standard library and effectively break out of the sandbox. \n\n## Proof of Concept:\nThis code accesses the process object and calls `.exit()`\n```js\nvar safeEval = require('safe-eval');\nsafeEval(\"this.constructor.constructor('return process')().exit()\");\n```\n\n\n## Recommendation\n\nUpdate to version 0.4.0 or later","status":"published","published":"2018-07-18T18:28:10Z","modified":"2023-09-11T22:19:20Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-610"],"updated_at":"2026-11-02T14:37:04.447845Z"}],"nvd":[{"id":"CVE-2017-16088","description":"The safe-eval module describes itself as a safer version of eval. By accessing the object constructors, un-sanitized user input can access the entire standard library and effectively break out of the sandbox.","status":"published","published":"2018-06-07T02:29:01.643Z","modified":"2026-06-17T01:08:46.58Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":10,"vector":"AV:N/AC:L/Au:N/C:C/I:C/A:C","level":"high","assessor":"primary"}],"cwes":["CWE-610"],"updated_at":"2026-11-02T14:04:17.638656Z"}],"osv":[{"id":"CVE-2017-16088","description":"The safe-eval module describes itself as a safer version of eval. By accessing the object constructors, un-sanitized user input can access the entire standard library and effectively break out of the sandbox.","status":"published","published":"2018-06-07T02:29:01.643Z","modified":"2026-10-20T10:48:16.377664544Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:04.853379Z"},{"id":"GHSA-ww6v-677g-p656","title":"Sandbox Breakout in safe-eval","description":"Affected versions of `safe-eval` are vulnerable to a sandbox escape. By accessing object constructors, un-sanitized user input can access the entire standard library and effectively break out of the sandbox. \n\n## Proof of Concept:\nThis code accesses the process object and calls `.exit()`\n```js\nvar safeEval = require('safe-eval');\nsafeEval(\"this.constructor.constructor('return process')().exit()\");\n```\n\n\n## Recommendation\n\nUpdate to version 0.4.0 or later","status":"published","published":"2018-07-18T18:28:10Z","modified":"2023-11-08T03:59:04.122594Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-610"],"updated_at":"2026-11-02T15:46:59.131095Z"}]}}
