Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit malicious JS to vm2 sandbox
-
DeliveryObtain host-realm Promise from exposed host API
-
ExploitOverwrite p.constructor[Symbol.species]
-
ExecutionCall p.then() with no onRejected, triggering V8 Thrower
-
PersistCapture unsanitized host bridge proxy
-
ImpactPivot host process object to host command execution
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Protection mechanism completeness
|
| Exploitation Conditions | Requires that the embedding application (1) uses vm2 VM or NodeVM to execute attacker-controlled/untrusted JavaScript, and (2) exposes at least one host API to the sandbox that returns a host-realm (native) Promise whose rejection value is host-pivotable - the advisory specifically cites a host process object. When present, the sandbox overwrites p.constructor[Symbol.species] and calls p.then() with no onRejected handler, defeating hostPromiseSanitizeReject/handleException in lib/bridge.js because the neutralization is only installed on the sandbox intrinsic Promise.prototype, never on host Promises. LIMITING FACTORS: exploitation is gated on the embedder exposing a host-Promise-returning API with a pivotable rejection value; embedders that expose no such API, or that only return sandbox-realm promises, are not exploitable. Affects vm2 <=3.12.0; fixed in 3.12.1. |
| Impact | This is a genuinely high-priority issue, not a high-CVSS-but-low-risk paper cut. The CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H, score 10.0) reflects a full sandbox escape to host arbitrary code execution, and CWE-693 (Protection Mechanism Failure) correctly captures that the security boundary vm2 exists to provide is defeated. vm2's entire purpose is to execute UNTRUSTED code, so PR:N is realistic: the attacker IS the sandboxed code, which the embedder deliberately runs. The subsequent-system impact metrics (SC/SI/SA:H) are justified because control pivots from the sandbox realm to the host Node.js process. No EPSS score, CISA KEV entry, or explicit POC flag is present in the input, so exploitation likelihood cannot be quantified from these signals; however, the advisory describes a precise, deterministic V8-internal-Thrower technique, which lowers the practical barrier to weaponization. The one real limiter is a per-embedder precondition (see exploitation_conditions): the host must expose an API returning a host-realm Promise whose rejection value is host-pivotable. Given vm2's known history of repeated escapes and its deprecation, defenders running any version <=3.12.0 with untrusted code should treat this as critical and patch immediately. |
| Exploit ScenarioDerived | An application uses vm2 to run untrusted user-supplied JavaScript and exposes a host helper that returns a native Promise. The sandboxed code overwrites the host Promise's constructor Symbol.species, calls p.then() with no onRejected handler so V8 substitutes its internal Thrower, and captures the raw unsanitized host rejection value (e.g. a host process object). No public exploit code is flagged in the input, but the advisory documents the full technique, making reliable reproduction straightforward for a skilled attacker. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 18, 2026
Sandbox escape in vm2 3.12.0 and earlier allows unauthenticated remote attackers who can supply JavaScript to an application embedding vm2's VM or NodeVM to break out of the sandbox and execute arbitrary code on the host, provided the embedder exposes at least one host API returning a host-realm (native) Promise whose rejection value is host-pivotable - the advisory cites a host process object as the example. The flaw is an incomplete rejection-sanitization failure in lib/bridge.js: the sandbox-side Symbol.species and .then neutralization is installed only on the sandbox intrinsic Promise.prototype, so it never applies to host Promises, letting sandboxed code overwrite p.constructor[Symbol.species] and call p.then() without an onRejected handler, after which V8's internal Thrower re-throws the raw host rejection value into an attacker-controlled resolve/reject closure, bypassing handleException and hostPromiseSanitizeReject and yielding an unsanitized, fully functional bridge proxy of the host object. No public exploit identified at time of analysis, but the CVSS 4.0 base score is 10.0 and the issue is fixed in 3.12.1.
RemediationAI
Upgrade vm2 to 3.12.1, the vendor-released patch, as the primary fix per the GitHub advisory GHSA-6454-5x88-m6jw and the VulnCheck advisory. Until upgrading, the most effective compensating control is to stop exposing host-realm Promises to the sandbox: any host API exposed to VM or NodeVM should either return a sandbox-realm Promise or avoid returning host objects in rejection values - specifically, never let a host process object or any other host-pivotable object reach a Promise rejection that sandboxed code can observe. Note that stripping function-valued rejection handlers is not a workaround, because the bypass relies on the absence of an onRejected function and on host-realm Promises not being covered by the sandbox-side neutralization. Embedders that cannot change these APIs should restrict untrusted code execution, for example by running vm2 workloads in a separate low-privilege process or container with no host filesystem or process access, accepting the performance and functionality trade-offs. After upgrading, validate that no embedder API still returns a host-realm Promise whose rejection value is host-pivotable, since that pattern remains hazardous even on fixed code paths.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
vm2 is a Node.js library that runs untrusted JavaScript in a sandbox, using a bridge (lib/bridge.js) to mediate object references between the host and sandbox realms. This is a protection-mechanism failure (CWE-693): the bridge's rejection sanitizer (hostPromiseSanitizeReject, makeSanitizedPromiseCallback, normalizeHostPromiseCallbacks) only wraps then/catch rejection slots that hold a function, and the sandbox-side Symbol.species/.then neutralization is installed only on the sandbox intrinsic Promise.prototype, never on host-realm Promise objects. When an embedder exposes a host API that returns a host-realm Promise, sandboxed code can overwrite p.constructor[Symbol.species] and call p.then() with no onRejected handler; V8 substitutes its internal Thrower, which re-throws the raw host rejection value into a resolve/reject closure the attacker controls. That closure then returns an unsanitized, fully functional bridge proxy of the host object to sandboxed code, defeating handleException and hostPromiseSanitizeReject. If the rejection value is host-pivotable - for example a host process object - the result is arbitrary code execution on the host. The affected component is the npm package patriksimek:vm2 (CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:*), all versions 0 through 3.12.0, fixed in 3.12.1; exploitation is gated on the embedder exposing a host-Promise-returning API with a pivotable rejection value, and embedders that expose no such API or only return sandbox-realm promises are not exploitable.
Know when Vm2 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Untrusted sandboxed code is the attacker (PR:N/AV:N), the technique is deterministic (AC:L), and escape crosses the sandbox-to-host boundary (S:C) yielding full host RCE (C/I/A:H).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
vm2 (npm) versions 3.12.0 and earlier contain a sandbox escape in VM and NodeVM. When an embedder exposes a host API that returns a host-realm Promise, the bridge's rejection sanitizer (hostPromiseSanitizeReject / makeSanitizedPromiseCallback / normalizeHostPromiseCallbacks in lib/bridge.js) only wraps then/catch rejection slots that hold a function, and the sandbox-side Symbol.species/.then neutralization is installed only on the sandbox intrinsic Promise.prototype, so it never applies to a host Promise. Code running inside the sandbox can overwrite p.constructor[Symbol.species] on the host Promise and then call p.then() with no onRejected handler; V8 substitutes its internal Thrower, which re-throws the raw host rejection value into a resolve/reject closure captured by the attacker. This delivers an unsanitized, fully functional bridge proxy of the host object to sandboxed code, bypassing handleException and hostPromiseSanitizeReject. If the rejection value is host-pivotable (for example a host process object), this results in arbitrary code execution on the host. Fixed in 3.12.1.
Articles & Coverage 1
Technical POC Analysis
CWE-693 Protection Mechanism Failure (the advisory also lists CWE-913).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A critical sandbox-escape flaw in the vm2 JavaScript library (versions 3.12.0 and earlier) lets an attacker who can feed JavaScript into any application embedding it break out of the isolation boundary and run arbitrary code on the underlying host server. Because vm2 exists specifically to safely execute untrusted code, organizations using it in multi-tenant, customer-facing, or plugin-driven services should assume that isolation control can fail completely, exposing customer data, credentials, and service availability. Leadership should treat every internet-reachable or third-party-facing deployment on an affected version as potentially compromise-ready.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
vm2 is an advanced vm/sandbox for Node.js. Rated critical severity (CVSS 10.0), this vulnerability is remotely exploitab
vm2 is a sandbox that can run untrusted code with Node's built-in modules. Rated critical severity (CVSS 10.0), this vul
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 10.
There exists a vulnerability in source code transformer (exception sanitization logic) of vm2 for versions up to 3.9.15,
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 10.
This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr
Full sandbox escape with arbitrary code execution allows remote attackers to break out of vm2's Node.js sandbox environm
Sandbox escape in vm2 for Node.js allows remote unauthenticated attackers to execute arbitrary commands on the host syst
Sandbox escape in vm2 (patriksimek/vm2) versions prior to 3.11.3 enables remote code execution on the host Node.js proce
Sandbox escape in vm2 Node.js sandbox before 3.10.2 via Promise.prototype.then/catch callback sanitization bypass. PoC a
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 9.8
The package vm2 before 3.9.10 are vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the We
EUVD-2026-82901
GHSA-q84h-7qfg-c6j8
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB