Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit untrusted JS to NodeVM sandbox
-
ExploitCall require('child_process') bypassing node:-prefixed deny entry
-
ExecutionObtain host execSync/spawn references
-
ImpactExecute arbitrary OS commands on host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V8 - Authorization Least privilege enforcement
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the host application to run untrusted or attacker-controlled JavaScript inside vm2's NodeVM, AND to configure a wildcard require policy whose deny entry uses a node:-prefixed builtin specifier (e.g. new NodeVM({ require: { builtin: ['*', '-node:child_process'] } })). Under that exact configuration the deny fails and sandboxed code reaches host child_process via require('child_process') or require('node:child_process'), yielding execSync/spawn. Limiting factors: vm2 must be used as a security boundary for untrusted code (PR:L - attacker must be able to run code in the sandbox); a correctly formed deny entry ('-child_process'), a non-wildcard allow-list, or not exposing child_process at all avoids the flaw; and the affected versions are through 3.11.6 (fixed 3.11.7). No end-user interaction is required. |
| Impact | This is a genuine high-priority sandbox-escape leading to host command execution, but its real-world risk is strongly conditioned on how vm2 is deployed. The vendor CVSS 4.0 score of 9.4 is credible for the vm2 threat model (an application that deliberately runs untrusted/attacker JavaScript inside NodeVM): PR:L reflects that the attacker need only be able to execute code in the sandbox, and VC:H/VI:H/VA:H plus subsequent-system SC:H/SI:H/SA:H correctly capture that escaping the sandbox compromises the host process. My independent CVSS 3.1 assessment (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H, ~9.9) agrees on the severity of the impact given the preconditions. The critical qualifier is that this is a DENY-LIST BYPASS: it only bites deployments that (a) run untrusted code in NodeVM and (b) use a wildcard require policy while attempting to block a builtin using a node:-prefixed negative entry such as '-node:child_process'. A correctly written deny entry ('-child_process') or a non-wildcard allow-list is not affected. No EPSS score, no CISA KEV listing, and no public exploit code are present in the supplied intelligence, so there is no evidence of active exploitation - exploitation status is 'no public exploit identified at time of analysis'. Note also that vm2 has been formally deprecated by its author (who recommends migrating off it entirely), which both raises baseline risk for anyone still using it as a security boundary and limits the population of exploitable, up-to-date deployments. Net: treat as high-priority for the specific population running untrusted code in vm2 with this policy pattern; lower practical urgency for everyone else. |
| Exploit ScenarioDerived | An application uses NodeVM to run user-submitted JavaScript and tries to lock it down with a wildcard require policy like { builtin: ['*', '-node:child_process'] }, believing child_process is blocked. Because the deny entry is matched by exact string against the canonical name 'child_process' while require() strips the 'node:' prefix, the untrusted code simply calls require('child_process').execSync('...') and obtains full host command-execution. No public exploit code is referenced, but the technique is trivial to reproduce from the advisory description. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Sandbox escape in the vm2 Node.js library through 3.11.6 lets untrusted code running inside a NodeVM instance reach the host's child_process builtin and execute operating-system commands whenever the embedding application configures a wildcard builtin require policy containing a node:-prefixed deny entry. The affected configuration (for example new NodeVM({ require: { builtin: ['*', '-node:child_process'] } })) fails to deny the canonical child_process module, so sandboxed code can obtain execSync and spawn via require('child_process') or require('node:child_process'), giving host command-execution capability to code that was supposed to be isolated (CVSS 4.0 base 9.4; assessed CVSS 3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H). Exploitation requires PR:L privileges in the sense that the attacker must already be able to run attacker-controlled JavaScript inside the sandbox, and it only works under that specific deny-list form; a correctly spelled '-child_process' entry, a non-wildcard allow-list, or not exposing child_process at all avoids the flaw. No public exploit code or confirmed active exploitation was identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade vm2 to version 3.11.7, which fixes the negative-wildcard normalization defect; this is the primary and recommended action, and the fix is published at https://github.com/patriksimek/vm2/security/advisories/GHSA-8686-vhfx-7r3j and https://www.vulncheck.com/advisories/vm2-before-3.11.7-authentication-bypass-via-node-prefix. If immediate upgrade is not possible, apply one or more of the following compensating controls. First, correct the policy spelling: replace any node:-prefixed deny entry with the canonical bare name ('-child_process'), which restores the intended denial but must be applied consistently to every builtin you intend to block and only protects the rules you actually rewrite. Second, eliminate wildcard allow-lists: enumerate exactly the builtins the sandbox needs and omit child_process entirely, accepting that legitimate sandboxed code relying on unspecified builtins will begin to throw module-not-found errors. Third, where the sandbox must remain permissive, run the embedding process with a hardened execution profile so a leaked child_process reference cannot do real damage - dropping the process to an unprivileged user, applying seccomp/AppArmor confinement, enabling Linux no-new-privileges, and mounting the filesystem read-only for the sandboxed workload; these add deployment complexity, may break unrelated application functionality, and are containment rather than a true fix. Note that the affected condition is configuration-dependent: deployments that never grant child_process or that use explicit allow-lists without a wildcard are not exposed by this specific defect.
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
The vm2 package (CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:*, all versions through 3.11.6) implements a JavaScript sandbox for Node.js, and NodeVM.require accepts a policy object with allow/deny rules such as builtin: ['*', '-child_process']. Node.js accepts both legacy bare specifiers (child_process) and the newer node: scheme (node:child_process) for builtin modules, and vm2's resolver normalizes the node: prefix away during require() resolution so both spellings reach the same canonical builtin. The deny logic, however, matches negative wildcard entries by exact string comparison against the canonical builtin name, so an entry written as '-node:child_process' never matches the canonical 'child_process' and is silently ineffective. This is a normalization/consistency defect in the policy enforcement path, classified under CWE-269 (Improper Privilege Management): the sandbox grants privileges it was explicitly configured to withhold. The consequence is that the isolated module gains references to process-spawning APIs (execSync, spawn and related functions), which for untrusted sandboxed code is equivalent to host command execution, and it crosses the sandbox boundary (scope changed) with high impact to confidentiality, integrity and availability. Fixed in vm2 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:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Attacker runs code in the sandbox (PR:L) and trivially bypasses the deny entry (AC:L); escaping to host child_process is a scope change (S:C) granting full command execution (C/I/A:H).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
vm2 through 3.11.6 does not normalize node:-prefixed builtin specifiers when evaluating user-supplied negative (deny) entries in a NodeVM wildcard require policy. Although NodeVM strips the node: prefix during require() resolution, negative wildcard entries are matched by exact string comparison against the canonical builtin names, so a policy such as new NodeVM({ require: { builtin: ['*', '-node:child_process'] } }) fails to deny the canonical child_process module. Sandboxed code can therefore obtain the host child_process builtin via require('child_process') or require('node:child_process'), gaining references to process-spawning APIs such as execSync and spawn, which is equivalent to host command-execution capability for untrusted sandbox code. Fixed in vm2 3.11.7. (Suggested title: "vm2 before 3.11.7: NodeVM builtin deny-list bypass via node:-prefixed specifiers exposes child_process")
Technical POC Analysis
The supplied evidence is advisory text, not a patch diff.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 public PoC link from github
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
Applications using the vm2 Node.js library (through version 3.11.6) to isolate untrusted JavaScript can lose that isolation and allow sandboxed code to execute commands on the host operating system. This matters because any product, plugin platform, or multi-tenant service that relies on vm2 for security boundaries could expose host resources, customer data, and internal networks to an attacker who can already run code inside the sandbox. No vendor-released patch identified at time of analysis, and no public exploit identified at time of analysis.
Correct the require policy to deny '-child_process' (and '-node:child_process') or use a non-wildcard explicit allowlist that excludes child_process; avoid wildcard builtin allow policies with vm2 through 3.11.6. If that cannot be done, disable vm2-based untrusted code execution, migrate to a maintained isolation technology, and run workloads in separate low-privilege containers or processes with restricted filesystem and network access.
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
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
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-81606
GHSA-28q4-xrqh-9479
NVD
CVE.org
EPSS
Exploit-DB