Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply untrusted JS to vm2 sandbox
-
Deliveryrequire() colliding package name containing allowlisted substring
-
Exploitsubstring match approves unauthorized module
-
Executionvm2 loads package in host context
-
Impactexecute host code / escape sandbox
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Incorrectly specified target
|
| Exploitation Conditions | Requires that the host application (a) uses vm2 (before 3.11.7) to execute untrusted or attacker-influenced JavaScript, and (b) relies on vm2's external package allowlist (the require.external.modules / custom-resolver allowlist feature) as a trust boundary. The attacker must be able to introduce or reference a colliding package name that contains an allowlisted package name as a substring so the non-exact substring match approves it, and that colliding package must be resolvable/loadable in the host environment. Limiting factors: exploitation is meaningless if the app does not run untrusted code in vm2 or does not use the allowlist; the CVSS PR:L reflects that the attacker must already be able to run code inside the sandbox, and vm2 being deprecated bounds the realistic install base. |
| Impact | This is a genuine high-severity issue WITHIN the vm2 threat model, not merely a high-CVSS-but-low-impact finding. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N, all impact metrics High including subsequent-system SC:H/SI:H/SA:H) scores 9.4 and describes a sandbox-escape-class flaw: bypassing the external package allowlist lets sandboxed code load and execute unauthorized host packages in the host context, which is effectively arbitrary code execution on the host. I broadly AGREE with a critical rating but read the PR:L honestly - the 'privilege' here is the ability to run code inside the vm2 sandbox, which IS the entire premise of vm2's use, so operationally this behaves closer to unauthenticated-from-the-sandbox. Signals are CONFLICTING/INCOMPLETE in one direction only: there is NO EPSS score, NO CISA KEV listing, and NO explicit public exploit code identified at time of analysis, so despite the near-maximal CVSS this is not evidenced as widespread active exploitation. The dominant limiter is contextual: risk is real ONLY where an application (a) uses vm2 to run untrusted/attacker-influenced JavaScript AND (b) relies on the external package allowlist as a security boundary. vm2 is also deprecated (maintenance stopped ~3.9.19), so the '3.11.7' fix version does not cleanly match the real vm2 release history - treat the exact affected/fixed boundaries as needing vendor/advisory verification. |
| Exploit ScenarioDerived | An application uses vm2 to execute untrusted user-supplied JavaScript and permits only a curated allowlist of external npm packages (e.g. 'lodash'). The attacker publishes or supplies a colliding package name whose string contains an allowlisted substring, and calls require() on it; vm2's non-exact substring match approves it, loading and executing the attacker-controlled package in the host context for full host code execution. No public exploit code is identified at time of analysis, but the advisory (GHSA-c48m-32m9-vx93) describes the mechanism concretely. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Sandbox escape in vm2 before 3.11.7 allows an attacker who can already execute JavaScript inside the vm2 sandbox to bypass the external package allowlist and cause unauthorized host packages to be loaded and executed in the host context. The flaw is an incorrect authorization check: vm2 uses non-exact substring matching when validating package names against the allowlist, so a colliding package name that contains an allowlisted substring is approved. Exploitation requires the host application to use vm2 for untrusted code and to rely on the external package allowlist as a trust boundary; the CVSS vector indicates PR:L, meaning low privileges are required, and no public exploit or CISA KEV confirmed active exploitation was identified at time of analysis.
RemediationAI
Upgrade vm2 to version 3.11.7 or later; this is the vendor-released patch version that fixes the external package allowlist bypass. Apply the update in any host application that executes untrusted JavaScript with vm2, and verify that dependency trees do not pin older vm2 versions. If immediate upgrade is not possible, do not rely on vm2's require.external.modules allowlist as a security boundary: enforce exact package-name matching in a custom resolver if the resolver permits it, restrict resolvable modules to a tightly controlled set, and avoid running attacker-influenced code in vm2 until patched. Because vm2 is deprecated and its realistic install base is bounded, consider migrating to a maintained sandboxing approach with OS-level isolation such as containers, seccomp, or separate processes as a compensating control, noting that migration has compatibility and performance costs. Consult the GitHub advisory at https://github.com/patriksimek/vm2/security/advisories/GHSA-c48m-32m9-vx93 and the VulnCheck advisory at https://www.vulncheck.com/advisories/vm2-before-3.11.7-module-allowlist-bypass-via-custom-resolver for details. No public exploit was identified at time of analysis, but prioritize patching because the flaw breaks a sandbox trust boundary.
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 provides a sandbox for executing untrusted JavaScript with restricted access to the host. Its external package allowlist, implemented via require.external.modules or a custom resolver, is intended to let only explicitly approved Node modules be required from inside the sandbox. CVE-2026-92951 is rooted in CWE-706, Use of Incorrectly Resolved Name or Reference: the allowlist check performs substring matching instead of exact package-name boundary validation. As a result, when attacker-influenced code inside the sandbox calls require on a package whose name contains an allowlisted package name as a substring, vm2 incorrectly treats it as approved and resolves it in the host context. This breaks the sandbox trust boundary and permits loading and executing unauthorized host packages with host privileges. CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:* identifies patriksimek vm2 as the affected product, with all versions before 3.11.7 in scope. The independent assessment confirms high severity within the vm2 threat model, with an assessed CVSS:3.1 vector of AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H, while noting exploitation is only meaningful when the host application runs untrusted code in vm2 and uses the allowlist as a security boundary.
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
Sandbox-to-host escape gives S:C with full C/I/A:H; PR:L because attacker must already run code inside the vm2 sandbox; AV:N/AC:L as the substring collision is reliably triggerable.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
vm2 before 3.11.7 contains an incorrect authorization vulnerability in the external package allowlist check that uses non-exact substring matching instead of full package-name boundary validation. Attackers can bypass the allowlist by requiring a colliding package name that contains an allowlisted package substring, causing vm2 to load and execute unauthorized host packages in the host context.
Technical POC Analysis
Bug class: CWE-706, with the advisory also listing CWE-863 and CWE-829.
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
vm2, a JavaScript sandbox library used to execute untrusted code, contains a critical sandbox escape vulnerability (CVE-2026-92951) affecting versions before 3.11.7. An attacker with low privileges who can already run JavaScript inside the sandbox can bypass the package allowlist and execute arbitrary code on the host system, potentially leading to full host compromise, data theft, or lateral movement. Organizations relying on vm2 for secure multi-tenancy or untrusted code execution should treat this as a high-priority risk and act immediately to upgrade to version 3.11.7.
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
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
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-81600
GHSA-6fvh-fgmg-3x7v
NVD
CVE.org
EPSS
Exploit-DB