Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSupply untrusted JS to vm2 sandbox
-
DeliveryObtain bridged host-realm Promise
-
ExploitRegister handler via p.then.call/.apply indirection
-
InstallBypass bridge rejection sanitiser (lib/bridge.js:1624)
-
C2Receive live proxy to host object from rejected Error property
-
ExecuteexecSync via child_process on host
-
ImpactFull host-process RCE
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the vm2 threat model (host application intentionally executes untrusted JavaScript in a vm2 3.11.6 sandbox) PLUS a specific embedder configuration: the application must expose a host-realm Promise to the sandbox - either an async host function bridged through the sandbox option, or an async method on a NodeVM external module - and that Promise must reject with an Error object that carries a non-primitive OWN property referencing a host object (e.g., err.detail = process). The attacker-controlled sandbox code must register the rejection handler specifically via Function.prototype.call/.apply indirection (p.then.call(p, undefined, cb)); the direct p.then(undefined, cb), .bind, and Reflect.apply forms are correctly sanitised and do NOT work. Limiting factors: exploitation is impossible if no async host Promise is bridged into the sandbox, or if bridged Promises never reject with host-object-bearing Error properties; sandboxes exposing only synchronous or primitive-returning bridges are not affected. Upgrading to vm2 3.11.7 closes the bypass. |
| Impact | This is a genuine, high-priority sandbox-escape-to-RCE, not a high-CVSS-but-low-real-risk inflation. The vendor CVSS 4.0 base score is 10.0 (AV:N/AC:L/PR:N/UI:N with full VC/VI/VA:H and subsequent-system SC/SI/SA:H reflecting the host-process compromise beyond the sandbox). Within the vm2 threat model - an application deliberately running untrusted JavaScript inside the sandbox - the impact is complete: arbitrary command execution with host-process privileges. However, exploitation is NOT unconditional: it requires the embedder to have exposed a host-realm Promise to the sandbox (a bridged async host function via the sandbox option, or a NodeVM external module async method) that rejects with an Error carrying a non-primitive own property referencing a host object. That specific precondition, plus the fact that this is an incomplete fix bypass of GHSA-m283-3h24-438v (direct then/bind/Reflect.apply forms are already sanitised; only the .call/.apply indirection slips through), argues for higher attack complexity than the vendor's AC:L implies. No EPSS score, no CISA KEV listing, and no explicitly published standalone POC are present in the provided data (though the VulnCheck advisory and GHSA-647f-g98j-qq25 likely contain technical detail). Exploitation status: no public exploit identified at time of analysis. The absence of KEV/EPSS is consistent with a newly-disclosed flaw in a deprecated library rather than evidence of low severity - priority should be driven by whether you actually run vm2 with async host bridges exposed. |
| Exploit ScenarioDerived | An application uses vm2 3.11.6 to run untrusted plugin/user JavaScript and bridges an async host helper (e.g., a database or fetch wrapper) into the sandbox. The untrusted code registers a rejection handler indirectly via p.then.call(p, undefined, cb) so the bridge's identity check sees host Function.prototype.call as the target and skips sanitisation; when the host Promise rejects with an Error whose own property references a host object (err.detail = process), the sandbox receives a live proxy and calls e.detail.mainModule.require('child_process').execSync(...) to run commands as the host process. No public exploit was identified in the provided data, but the advisory describes the exact bypass primitive. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Sandbox escape leading to remote code execution in vm2 3.11.6 lets untrusted code inside the sandbox reach a live proxy to a host-realm object and run commands with the host process privileges, for example through e.detail.mainModule.require('child_process').execSync(...). The flaw is an incomplete fix for GHSA-m283-3h24-438v: registering a rejection handler via Function.prototype.call or .apply indirection (p.then.call(p, undefined, cb)) bypasses the identity check at lib/bridge.js:1624, so the raw host Error and its non-primitive own properties are handed to sandbox code. Exploitation is conditional: the embedder must bridge an async host Promise into the sandbox and that Promise must reject with an Error carrying a non-primitive own property that references a host object (for example err.detail = process); direct p.then(undefined, cb), .bind and Reflect.apply forms are correctly sanitised. Upgrade to vm2 3.11.7 closes the bypass; no public exploit identified at time of analysis.
RemediationAI
Vendor-released patch: vm2 3.11.7 fixes the bypass, and upgrading is the only complete remediation; the advisory is at https://github.com/patriksimek/vm2/security/advisories/GHSA-647f-g98j-qq25 and the VulnCheck analysis at https://www.vulncheck.com/advisories/vm2-3.11.6-remote-code-execution-via-promise-call-apply. If immediate upgrade is not possible, stop exposing host-realm Promises to the sandbox: disable async host functions bridged via the sandbox option and async methods on NodeVM external modules, accepting reduced sandbox functionality. Where asynchronous bridges cannot be removed, sanitise every rejection Error on the host side before it crosses the bridge, stripping or cloning all non-primitive own properties so only primitive data reaches sandbox code; this blocks the err.detail = process style of leak but must be applied to every bridged async path and can break applications that legitimately pass structured error details. Because the bypass specifically uses Function.prototype.call or .apply indirection, blacklisting those patterns in sandbox code is not a reliable control, and the patched release remains the only robust fix.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
vm2 is a widely used JavaScript sandbox for Node.js that relies on a bridge layer (lib/bridge.js) to mediate objects crossing between the host realm and the sandboxed VM context, rebuilding or sanitising values so that host capabilities are not exposed. This is CWE-94 (improper control of generation of code), the same class as the original GHSA-m283-3h24-438v fix, but the sanitiser at lib/bridge.js:1624 identity-checks only the direct call target when deciding whether to rebuild or sanitise a rejected host Promise. When sandbox code registers the rejection handler through Function.prototype.call or .apply indirection, the intercepted target becomes Function.prototype.call itself rather than the sandbox function the sanitiser is looking for, so the rebuild/sanitise path is skipped and the raw host Error crosses the bridge with its own properties intact. Any non-primitive own property on that Error that points at a host object is then handed to sandbox code as a fully functional proxy; in the documented example err.detail = process, sandbox code can follow e.detail.mainModule.require('child_process').execSync(...) to execute arbitrary commands with the host process privileges. The CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:* identifies the patriksimek vm2 package as the affected product, and the specific vulnerable build is 3.11.6, fixed in 3.11.7.
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
PR:N and AV:N because untrusted sandbox code is the unauthenticated attacker; AC:H for the specific bridged-Promise plus host-object-property rejection precondition; S:C as the escape breaks out to the host process.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
vm2 3.11.6 is vulnerable to a sandbox escape leading to remote code execution in the host Node.js process. The fix for GHSA-m283-3h24-438v is incomplete: the bridge gate at lib/bridge.js:1624 identity-checks only the direct call target when deciding whether to rebuild/sanitise a rejected host Promise value. Registering the rejection handler through Function.prototype.call or .apply indirection (e.g., p.then.call(p, undefined, cb)) makes the intercepted target host Function.prototype.call, so the sanitiser never runs and the raw host error reaches sandbox code with its own properties intact. If an embedder exposes a host-realm Promise to the sandbox (an async host function bridged via the sandbox option, or a NodeVM external module's async method) and that Promise rejects with an Error carrying a non-primitive own property referencing a host object (for example err.detail = process), untrusted code in the sandbox obtains a fully functional proxy to that host object and can execute arbitrary commands with the privileges of the host process (e.g., e.detail.mainModule.require('child_process').execSync(...)). The direct p.then(undefined, cb), bind, and Reflect.apply forms are correctly sanitised. Fixed in vm2 3.11.7.
Blast Radius
ecosystem impact- 18 npm packages depend on vm2 (6 direct, 12 indirect)
Ecosystem-wide dependent count for version 3.11.6.
Articles & Coverage 1
Technical POC Analysis
This is CWE-94 Improper Control of Generation of Code ("Code Injection"); the advisory also lists CWE-693 Protection Mechanism Failure.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
vm2 3.11.6 contains a sandbox escape that can lead to remote code execution with host process privileges, directly affecting any application that uses vm2 to execute untrusted JavaScript. Although no public exploit identified at time of analysis, the CVSS 10.0 severity means a successful attack could compromise sensitive data, credentials, and adjacent systems, making this a leadership-level risk. Vendor-released patch: 3.11.7 is available and should be treated as an urgent remediation priority.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
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-81587
GHSA-3f84-vwv5-r42g
NVD
CVE.org
EPSS
Exploit-DB