vm2
npm78 known CVEs affecting this package
Aggregated from OSV, GitHub Security Advisories, NVD, and vendor advisories. Each CVE links to its full detail page with vendor advisories, patches, fixed versions, and remediation guidance.
CVEs affecting vm2page 1 of 2
- CVE-2019-10761HIGHCVSS 8.3EG 8.3fixed in 3.6.112022-07-13
This affects the package vm2 before 3.6.11. It is possible to trigger a RangeError exception from the host rather than the "sandboxed" context by reaching the stack call limit with an infinite recursion. The returned object is then used to…
- CVE-2021-23449CRITICALCVSS 9.8EG 9.8fixed in 3.9.42021-10-18
This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitrary code on the host machine.
- CVE-2021-23555CRITICALCVSS 9.8EG 9.8fixed in 3.9.62022-02-11
The package vm2 before 3.9.6 are vulnerable to Sandbox Bypass via direct access to host error objects generated by node internals during generation of a stacktraces, which can lead to execution of arbitrary code on the host machine.
- CVE-2022-25893CRITICALCVSS 9.8EG 9.8fixed in 3.9.102022-12-21
The package vm2 before 3.9.10 are vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the WeakMap.prototype.set method. Exploiting this vulnerability leads to access to a host object and a sandbox compromise.
- CVE-2022-36067CRITICALCVSS 10.0EG 10.0fixed in 3.9.112022-09-06
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. In versions prior to version 3.9.11, a threat actor can bypass the sandbox protections to gain remote code execution rights on the host running the sand…
- CVE-2023-29017CRITICALCVSS 10.0EG 10.0fixed in 3.9.152023-04-06
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Prior to version 3.9.15, vm2 was not properly handling host objects passed to `Error.prepareStackTrace` in case of unhandled async errors. A threat acto…
- CVE-2023-29199CRITICALCVSS 9.8EG 9.8fixed in 3.9.162023-04-14
There exists a vulnerability in source code transformer (exception sanitization logic) of vm2 for versions up to 3.9.15, allowing attackers to bypass `handleException()` and leak unsanitized host exceptions which can be used to escape the …
- CVE-2023-30547CRITICALCVSS 9.8EG 9.8fixed in 3.9.172023-04-17
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. There exists a vulnerability in exception sanitization of vm2 for versions up to 3.9.16, allowing attackers to raise an unsanitized host exception insid…
- CVE-2023-32313MEDIUMCVSS 5.3EG 5.3fixed in 3.9.182023-05-15
vm2 is a sandbox that can run untrusted code with Node's built-in modules. In versions 3.9.17 and lower of vm2 it was possible to get a read-write reference to the node `inspect` method and edit options for `console.log`. As a result a thr…
- CVE-2023-32314CRITICALCVSS 9.8EG 9.8fixed in 3.9.182023-05-15
vm2 is a sandbox that can run untrusted code with Node's built-in modules. A sandbox escape vulnerability exists in vm2 for versions up to and including 3.9.17. It abuses an unexpected creation of a host object based on the specification o…
- CVE-2023-37466CRITICALCVSS 9.8EG 9.8fixed in 3.10.02023-07-14
vm2 is an advanced vm/sandbox for Node.js. The library contains critical security issues and should not be used for production. The maintenance of the project has been discontinued. In vm2 for versions up to 3.9.19, `Promise` handler sanit…
- CVE-2023-37903CRITICALCVSS 9.8EG 9.82023-07-21
vm2 is an open source vm/sandbox for Node.js. In vm2 for versions up to and including 3.9.19, Node.js custom inspect function allows attackers to escape the sandbox and run arbitrary code. This may result in Remote Code Execution, assuming…
- CVE-2026-100721CRITICALCVSS 9.0EG 9.0fixed in 3.12.22026-09-27
vm2 before 3.12.2 contains an authorization bypass in the NodeVM external-module resolver. When an embedder configures `require.external` with a custom resolver (and `context: 'host'`), `LegacyResolver.customResolve` in lib/resolver-compat…
- CVE-2026-100722MEDIUMCVSS 6.8EG 6.8fixed in 3.12.22026-09-27
vm2 before 3.12.2 does not apply host-side Promise rejection handling in the sandbox-to-host construct trap. In BaseHandler, the apply trap calls markHostPromiseHandled() on the returned value, but the adjacent construct path returns the r…
- CVE-2026-100723HIGHCVSS 7.5EG 7.5fixed in 3.12.22026-09-27
vm2 before 3.12.2 does not apply its Buffer backing-store ownership invariant (byteOffset === 0 and buffer.byteLength === length) to Buffers returned from host builtin modules. When an application explicitly exposes Node's zlib module thro…
- CVE-2026-22709CRITICALCVSS 10.0EG 10.0fixed in 3.10.22026-01-26
vm2 is an open source vm/sandbox for Node.js. In vm2 prior to version 3.10.2, `Promise.prototype.then` `Promise.prototype.catch` callback sanitization can be bypassed. This allows attackers to escape the sandbox and run arbitrary code. In …
- CVE-2026-24118CRITICALCVSS 9.8EG 9.8fixed in 3.11.02026-05-04
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.0, VM2 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 …
- CVE-2026-24120CRITICALCVSS 9.8EG 9.8fixed in 3.10.52026-05-04
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.10.5, the fix for CVE-2023-37466 is insufficient and can be circumvented allowing attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands…
- CVE-2026-24781CRITICALCVSS 9.8EG 9.8fixed in 3.11.02026-05-04
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.0, VM2 suffers from a sandbox breakout vulnerability through the inspect function. This allows attackers to write code which can escape from the VM2 sandbox and execute ar…
- CVE-2026-26332CRITICALCVSS 10.0EG 10.0fixed in 3.11.02026-05-04
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.0, SuppressedError allows attackers to escape the sandbox and run arbitrary code. This issue has been patched in version 3.11.0.
- CVE-2026-26956CRITICALCVSS 9.8EG 9.8fixed in 3.10.52026-05-04
vm2 is an open source vm/sandbox for Node.js. In version 3.10.4, vm2 is vulnerable to full sandbox escape with arbitrary code execution. Attacker code inside VM.run() obtains host process object and runs host commands with zero host cooper…
- CVE-2026-43997CRITICALCVSS 10.0EG 10.0fixed in 3.11.02026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, it is possible to obtain the host Object. There are various ways to use the host Object, to escape the sandbox, one example would be using HostObject.getOwnPropertySymbols to o…
- CVE-2026-43998HIGHCVSS 8.5EG 8.5fixed in 3.11.02026-05-13
vulnerable: 3.10.5
vm2 is an open source vm/sandbox for Node.js. In 3.10.5, NodeVM's 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. Bec…
- CVE-2026-43999CRITICALCVSS 9.9EG 9.9fixed in 3.11.02026-05-13
vulnerable: 3.10.5
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, NodeVM's builtin allowlist can be bypassed when the module builtin is allowed (including via the '*' wildcard). The module builtin exposes Node's Module._load(), which loads an…
- CVE-2026-44000MEDIUMCVSS 6.5EG 6.5fixed in 3.11.02026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, a sandbox boundary violation in vm2 allows host object identity to cross into the sandbox through host Promise resolution. When a host-side Promise that resolves to a host obje…
- CVE-2026-44001HIGHCVSS 8.6EG 8.6fixed in 3.11.02026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, a sandbox escape vulnerability in vm2 v3.10.5 allows any sandboxed code to crash the host Node.js process via a single Promise constructor that triggers an unhandled rejection …
- CVE-2026-44002MEDIUMCVSS 5.8EG 5.8fixed in 3.11.02026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, vm2's CallSite wrapper class (intended as a safe wrapper for V8's native CallSite) blocks getThis() and getFunction() to prevent host object leakage, but allows getFileName() t…
- CVE-2026-44003MEDIUMCVSS 5.3EG 5.3fixed in 3.11.02026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, vm2's code transformer has a performance optimization that skips AST analysis when the code does not contain catch, import, or async keywords. This fast-path bypass allows sand…
- CVE-2026-44004HIGHCVSS 7.5EG 7.5fixed in 3.11.02026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, sandboxed code can call Buffer.alloc() with an arbitrary size to allocate memory directly on the host heap. Because Buffer.alloc is a synchronous C++ native call, vm2's timeout…
- CVE-2026-44005CRITICALCVSS 10.0EG 10.0fixed in 3.11.02026-05-13
vm2 is an open source vm/sandbox for Node.js. From 3.9.6 to 3.10.5, vm2's bridge exposes mutable proxies for real host-realm intrinsic prototypes and then forwards sandbox writes into the underlying host objects with otherReflectSet() and …
- CVE-2026-44006CRITICALCVSS 10.0EG 10.0fixed in 3.11.02026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, It is possible to reach BaseHandler.getPrototypeOf, which can be used to get arbitrary prototypes. This vulnerability is fixed in 3.11.0.
- CVE-2026-44007CRITICALCVSS 9.1EG 9.1fixed in 3.11.12026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.1, when a NodeVM is created with nesting: true, sandbox code can unconditionally require('vm2') regardless of the outer VM's require configuration — including require: false. Wi…
- CVE-2026-44008CRITICALCVSS 9.8EG 9.8fixed in 3.11.22026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.2, the new method neutralizeArraySpeciesBatch works with objects from the other side but can call into this side via getter on the array prototype exposing objects of the wrong si…
- CVE-2026-44009CRITICALCVSS 9.8EG 9.8fixed in 3.11.22026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.2, This vulnerability is fixed in 3.11.2.
- CVE-2026-45411CRITICALCVSS 9.8EG 9.8fixed in 3.11.32026-05-13
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.3, it is possible to catch a host exception using the yield* expression inside an async generator. When the generator is closed using the return function, the value is awaited on …
- CVE-2026-47131CRITICALCVSS 10.0EG 10.0fixed in 3.11.42026-05-29
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, by combining Buffer.call.call({}.__lookupGetter__, Buffer, "__proto__"), Buffer.call.call({}.__lookupSetter__, Buffer, "__proto__"), and Node.js's ERR_INVALID_ARG_TYPE …
- CVE-2026-47135HIGHCVSS 8.7EG 8.7fixed in 3.11.42026-05-29
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. Combined with the bridge's set/defineProperty/deleteProperty traps…
- CVE-2026-47137CRITICALCVSS 10.0EG 10.0fixed in 3.11.42026-05-29
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, the fix for GHSA-8hg8-63c5-gwmx (CVE-2023-37903) introduced a check in nodevm.js line 263 that blocks the combination nesting: true + require: false. However, the check…
- CVE-2026-47139HIGHCVSS 8.6EG 8.6fixed in 3.11.42026-05-29
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, NodeVM supports excluding public network builtins from the wildcard builtin option. With this configuration direct access to http, https, http2, net, dgram, tls, dns, a…
- CVE-2026-47140CRITICALCVSS 10.0EG 10.0fixed in 3.11.42026-05-29
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, NodeVM blocks several dangerous Node.js builtins such as module, worker_threads, cluster, vm, repl, and inspector. However, the denylist misses process and inspector/pr…
- CVE-2026-47141MEDIUMCVSS 6.9EG 6.9fixed in 3.11.42026-05-29
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, NodeVM exposes some process-wide observability builtins when they are allowed through require.builtin. The diagnostics_channel, async_hooks, and perf_hooks builtins are…
- CVE-2026-47208CRITICALCVSS 10.0EG 10.0fixed in 3.11.42026-05-29
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, VM2 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 …
- CVE-2026-47209HIGHCVSS 8.6EG 8.6fixed in 3.11.42026-05-29
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, the BaseHandler.set trap in bridge.js (line 1231) ignores the receiver parameter and unconditionally writes to the host target object. Per the Proxy set trap specificat…
- CVE-2026-47210CRITICALCVSS 9.8EG 9.8fixed in 3.11.42026-05-29
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, a sandbox escape vulnerability in vm2 allows arbitrary code execution in the host process when untrusted code is executed with async support on runtimes exposing WebAss…
- CVE-2026-47683HIGHCVSS 8.7EG 8.7fixed in 3.11.62026-08-17
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.6, the bufferAllocLimit enforcement in lib/setup-sandbox.js does not cover Buffer.concat(list, totalLength) or Buffer.from(arrayLike) with an attacker-controlled length, allowing …
- CVE-2026-47686CRITICALCVSS 9.9EG 9.9fixed in 3.11.62026-08-17
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 san…
- CVE-2026-47698CRITICALCVSS 9.8EG 9.8fixed in 3.11.62026-08-17
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 sa…
- CVE-2026-92933MEDIUMCVSS 5.8EG 5.8fixed in 3.11.82026-09-17
vm2 is a sandbox for running untrusted Node.js code. In versions <= 3.11.7, NodeVM exposes the host `util` module to the sandbox as an unfiltered shallow copy (`Object.assign({}, util)` in `defaultBuiltinLoaderUtil`), and the deprecated `s…
- CVE-2026-92934CRITICALCVSS 9.0EG 9.0fixed in 3.11.82026-09-17
vm2 before 3.11.8 contains an incomplete fix for Error.cause sanitization that allows sandbox escape when revisited host-wrapped AggregateError objects are caught within a single exception handler traversal. Attackers can exploit cycle det…
- CVE-2026-92935CRITICALCVSS 9.0EG 9.0fixed in 3.11.72026-09-17
vm2 is a sandbox for running untrusted Node.js code. In versions >= 3.11.4 and <= 3.11.6, the NodeVM constructor computes `hasRealRequireConfig` with `typeof requireOpts === 'object' && requireOpts !== null`, so an array-shaped `require` v…
Check whether vm2 is used in your infrastructure
EchelonGraph scans your cloud and SBOMs to map every package to your actual deployments. See blast radius for vm2 CVEs against the assets you own.
Book a Demo →