vm2 vulnerabilities
30 known CVE vulnerabilities in vm2, translated and rated.
- CVE-2026-47698Critical
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.6, lib/bridge.js and lib/setup-sandbox.js fail to block stacked indirection through Function.prototype.call around dangerous host prototype getter and setter mutators, allowing sandbox code to sever a host intrinsic's prototype chain and reach e.constructor.constructor for arbitrary host command execution. This issue is fixed in version 3.11.6.
- CVE-2026-47686Critical
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.6, handleException() in lib/setup-sandbox.js sanitizes SuppressedError.error, SuppressedError.suppressed, and AggregateError.errors but does not sanitize Error.cause, allowing sandbox code to obtain a powerful host object such as process from an embedder-exposed host function that throws an error with that object as its cause and then execute arbitrary host commands. This issue is fixed in version 3.11.6.
- CVE-2026-47210Critical
In vm2, prior to version 3.11.4, a sandbox escape vulnerability allowed arbitrary code execution in the host process when untrusted code was executed with async support. This issue has been patched in version 3.11.4.
- CVE-2026-47208Critical
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, vm2 suffers from a sandbox breakout vulnerability, allowing attackers to execute arbitrary commands on the host system.
- CVE-2026-47140Critical
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, NodeVM blocks several dangerous Node.js builtins, but the denylist misses process and inspector/promises, allowing sandboxed code to bypass restrictions.
- CVE-2026-47137Critical
In versions prior to 3.11.4, the vm2 library contained a vulnerability that allowed bypassing security related to the 'nesting: true' and 'require: false' options. The strict equality check in the code did not function correctly, enabling unauthorized requirements.
- CVE-2026-47131Critical
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, by combining certain calls, it was possible to obtain the host's TypeError constructor, allowing escape from the sandbox and execution of arbitrary code.
- CVE-2026-45411Critical
In the vm2 library for Node.js prior to version 3.11.3, a vulnerability allows catching a host exception using the yield* expression inside an async generator. Closing the generator with the return function causes the value to be awaited, and exceptions thrown in the then call can be caught and passed as the next value to the yield* iterator, enabling sandbox escape and arbitrary command execution on the host system.
- CVE-2026-44009Critical
A vulnerability in the vm2 library for Node.js allows sandbox escape. The issue is fixed in version 3.11.2.
- CVE-2026-44008Critical
A vulnerability in the vm2 library for Node.js prior to version 3.11.2 allows sandbox escape via the neutralizeArraySpeciesBatch method, which can call into the host side using a getter on the array prototype. This enables attackers to obtain host objects and the Function object, leading to arbitrary command execution on the host system.
- CVE-2026-44007Critical
A vulnerability in the vm2 library for Node.js allows bypassing the require configuration in NodeVM with nesting enabled. Sandbox code can require the vm2 module, create a new NodeVM instance with unrestricted require, and execute arbitrary OS commands on the host.
- CVE-2026-44006Critical
A vulnerability in the vm2 library for Node.js allows an attacker to bypass sandboxing and access arbitrary object prototypes. The issue is fixed in version 3.11.0.
- CVE-2026-44005Critical
A vulnerability in the vm2 library for Node.js (versions 3.9.6 to 3.10.5) allows attacker-controlled JavaScript running in the sandbox to mutate host prototypes such as Object.prototype, Array.prototype, and Function.prototype. This occurs because the bridge exposes mutable proxies for real host-realm intrinsic prototypes and forwards sandbox writes to host objects using ReflectSet() and ReflectDefineProperty().
- CVE-2026-43999Critical
A vulnerability in vm2 prior to 3.11.0 allows bypassing the NodeVM builtin allowlist. When the 'builtin' module is allowed (even via '*' wildcard), sandboxed code can use Module._load() to load any module in the host context, bypassing restrictions. This enables loading excluded modules like child_process and achieving remote code execution.
- CVE-2026-43997Critical
A vulnerability in the vm2 library for Node.js prior to version 3.11.0 allows obtaining the host object. Attackers can use various methods, e.g., HostObject.getOwnPropertySymbols, to obtain Symbol(nodejs.util.inspect.custom) and escape the sandbox.
- CVE-2026-26956Critical
A vulnerability in the vm2 library for Node.js version 3.10.4 allows full sandbox escape with arbitrary code execution. An attacker can obtain the host process object and run host commands without any host cooperation.
- CVE-2026-26332Critical
A vulnerability in the vm2 library for Node.js allows attackers to escape the sandbox and execute arbitrary code via the SuppressedError mechanism. The issue is fixed in version 3.11.0.
- CVE-2026-24781Critical
A vulnerability in the vm2 library for Node.js allows sandbox escape via the inspect function. Attackers can execute arbitrary commands on the host system.
- CVE-2026-24120Critical
A vulnerability in the vm2 library for Node.js allows bypassing the fix for CVE-2023-37466 and escaping the VM2 sandbox, enabling arbitrary command execution on the host. The issue is patched in version 3.10.5.
- CVE-2026-24118Critical
VM2 is an open source VM/sandbox for Node.js. Prior to version 3.11.0, it suffers from a sandbox breakout vulnerability allowing attackers to execute arbitrary commands on the host system.
- CVE-2023-37903Critical
vm2 is an open source vm/sandbox for Node.js. In versions up to and including 3.9.19, the inspect function in Node.js allows attackers to escape the sandbox and run arbitrary code.
- CVE-2023-37466Critical
The vm2 library, an advanced sandbox for Node.js, contains critical security issues and should not be used in production. In versions up to 3.9.19, `Promise` handler sanitization can be bypassed, allowing attackers to escape the sandbox and execute arbitrary code.
- CVE-2026-47683High
vm2 prior to version 3.11.6 has a vulnerability where the bufferAllocLimit enforcement does not cover Buffer.concat(list, totalLength) or Buffer.from(arrayLike) with an attacker-controlled length, allowing sandbox code to perform large synchronous host external-memory allocations that bypass the configured cap and can exhaust the host process.
- CVE-2026-47209High
In versions prior to 3.11.4, the vm2 library has a vulnerability in the BaseHandler.set method that ignores the receiver parameter and incorrectly writes to the target object. This leads to inherited properties leaking to the host object, creating an attack vector for dangerous cross-realm Symbol keys.
- CVE-2026-47141Medium
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, NodeVM exposes some process-wide observability builtins that can be used by sandboxed code to observe host application data.
- CVE-2026-47139High
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, NodeVM allowed excluding public network modules, but underscored internal HTTP modules like _http_client and _http_server were not blocked, enabling HTTP requests despite the exclusion of public modules.
- CVE-2026-47135High
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, Symbol.for override in setup-sandbox.js only intercepts 2 of 9 dangerous Node.js cross-realm symbols, allowing for the acquisition of real cross-realm symbols and control over host-side behavior.
- CVE-2026-44004High
A vulnerability in the vm2 library for Node.js prior to version 3.11.0 allows sandboxed code to call Buffer.alloc() with an arbitrary size, allocating memory directly on the host heap. Because Buffer.alloc is a synchronous C++ native call, vm2's timeout option cannot interrupt it, enabling a single request to exhaust host memory and crash the process.
- CVE-2026-44001High
A sandbox escape vulnerability in vm2 before 3.11.0 allows sandboxed code to crash the host Node.js process via a Promise constructor triggering an unhandled rejection. The issue affects version 3.10.5 and is fixed in 3.11.0.
- CVE-2026-43998High
In vm2 3.10.5, the NodeVM require.root path restriction can be bypassed using filesystem symlinks, allowing sandboxed code to load modules from outside the allowed root directory in host context. Because path validation uses path.resolve() (which does not dereference symlinks) but module loading uses Node's native require() (which does), an attacker can load arbitrary host-realm modules and achieve remote code execution.

