Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit JavaScript to NodeVM sandbox
-
DeliveryArray-shaped require bypasses nesting guard
-
Exploitrequire host vm2 module
-
ExecutionCreate inner NodeVM allowing child_process
-
ImpactExecute arbitrary OS commands as host process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Dynamic code resource control
|
| Exploitation Conditions | Requires a vm2 NodeVM (version 3.11.4-3.11.6) instance created with BOTH |
| Impact | The vendor CVSS 4.0 vector (9.5, AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H) rates this near-maximum, and the technical impact justifies it: a complete vm2 sandbox escape yielding arbitrary command execution (e.g. via child_process) with host Node.js process privileges - the worst outcome for a security-boundary library whose entire purpose is isolating untrusted code. However, several signals temper 'drop-everything' urgency. Exploitation is gated on a specific non-default configuration (NodeVM with truthy nesting AND an array-shaped require value like |
| Exploit ScenarioDerived | An application uses vm2 NodeVM 3.11.4-3.11.6 to run user-submitted JavaScript and is configured with |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Sandbox escape and remote code execution in vm2 versions 3.11.4 through 3.11.6 allow JavaScript executed inside a NodeVM to break out and run arbitrary commands with the privileges of the host Node.js process. The flaw is reachable only in a specific, non-default configuration where the NodeVM is created with a truthy nesting value and an array-shaped require option (for example new NodeVM({nesting: true, require: []})); in that case the array satisfies a guard intended to reject nesting without an explicit require configuration, and the resulting resolver falls back to a nesting override that permits the sandboxed code to require the host vm2 module and construct an inner NodeVM with an attacker-chosen builtin allowlist such as child_process. Exploitation requires no authentication or user interaction (CVSS 4.0 vector reports PR:N/UI:N) beyond the ability to supply code the sandbox runs, which is vm2's intended threat model; there is no public exploit code or CISA KEV confirmation of active exploitation at time of analysis, but the impact is complete confidentiality, integrity, and availability loss on the host, and the vendor CVSS 4.0 score of 9.5 is consistent with that assessed impact.
RemediationAI
Vendor-released patch: upgrade to vm2 3.11.7 or later, which is the version that fixes this issue; see advisory https://github.com/patriksimek/vm2/security/advisories/GHSA-8hr7-r645-pc6w and commit https://github.com/patriksimek/vm2/commit/54b54b74a382577f0bcd0538c5bf99acdcd7f53b. If immediate upgrade is not possible, audit every new NodeVM(...) call site and enforce the exact trigger conditions away: reject or normalize array-shaped require options (validate that require is a plain object, or simply omit/normalize the option), and avoid setting nesting: true unless truly required, since vm2 itself documents that enabling nesting grants the sandbox host-level trust. Applications that must run untrusted code while unpatched should treat the sandbox as untrusted and compensate at the OS layer - run the Node.js host as a dedicated low-privilege user, in a container or VM with no host filesystem or credential mounts, and with syscall/egress restrictions (for example seccomp profiles blocking process creation, or network namespace isolation) - accepting the trade-off of reduced functionality and higher operational overhead. Blocking or monkey-patching the host vm2 module for sandboxed code, or removing child_process and other command-execution builtins from the host process's require paths, are partial mitigations that reduce but do not eliminate the escape surface and may break legitimate application behavior; patching to 3.11.7 remains the only complete 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 Node.js library that executes untrusted JavaScript in a sandbox, and NodeVM is the variant that also mediates module require access. The defect is a type-validation weakness in the NodeVM constructor (CWE-913, Improper Control of Dynamically-Managed Code Resources): hasRealRequireConfig is computed as typeof requireOpts = 'object' && requireOpts ! null, and because JavaScript arrays report typeof ... === 'object', an array-shaped value passes the guard that is meant to reject nested sandbox creation when no explicit require configuration was supplied. makeResolverFromLegacyOptions() then destructures that array into undefined option fields, producing a resolver that carries only NESTING_OVERRIDE.vm2. With that override in place, attacker-supplied code can require the host vm2 module and instantiate a fresh inner NodeVM whose builtin allowlist the attacker controls, so child_process and similar modules become reachable and arbitrary OS commands execute outside the sandbox; the outer NodeVM's builtin restrictions do not propagate into the attacker-created inner VM. The underlying technology is Node.js module resolution plus vm2's legacy options-to-resolver translation path, where the truthiness/nesting override logic was not hardened against non-object-plain inputs.
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:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Untrusted code is the attacker (PR:N) submitted remotely (AV:N); AC:H reflects the required non-default nesting+array-require configuration; sandbox-to-host escape is S:C with full C/I/A impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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 value (for example require: []) satisfies the guard that is meant to reject nesting without an explicit require configuration. makeResolverFromLegacyOptions() then destructures the array into undefined option fields and returns a resolver containing only NESTING_OVERRIDE.vm2. As a result, an attacker who can supply JavaScript executed by a NodeVM configured with truthy nesting and an array-shaped require (e.g. new NodeVM({nesting: true, require: []})) can require the host vm2 module, create an inner NodeVM with an attacker-chosen builtin allowlist (such as child_process), and execute arbitrary commands with the privileges of the host Node.js process, escaping the sandbox. Outer builtin restrictions do not constrain the attacker-created inner NodeVM. This issue is fixed in vm2 3.11.7.
Blast Radius
ecosystem impact- 5 npm packages depend on vm2 (4 direct, 1 indirect)
Ecosystem-wide dependent count for version 3.11.4.
Articles & Coverage 1
Technical POC Analysis
CWE-913: Improper Control of Dynamically-Managed Code Resources.
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, a widely used JavaScript sandbox library for Node.js, contains a critical sandbox escape vulnerability (CVE-2026-92935) in versions 3.11.4 through 3.11.6 that could allow attackers to execute arbitrary code with host process privileges under a specific non-default configuration. Exploitation requires no authentication or user interaction, though no public exploit identified at time of analysis. Leadership should prioritize remediation because successful exploitation could lead to full system compromise, data breaches, or service disruption.
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-81585
GHSA-8hr7-r645-pc6w
NVD
CVE.org
EPSS
Exploit-DB