Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRun untrusted code in configured vm2 sandbox
-
DeliveryOperate from an allowlisted package
-
ExploitRelative-require a prefix-sharing package
-
ExecutionBypass raw prefix allowlist check
-
ImpactLoad non-allowlisted module
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires vm2's threat model to be in play: the host application must deliberately execute untrusted JavaScript inside vm2. Beyond that, exploitation depends on a specific non-default configuration - a module allowlist must be enforced AND transitive loading disabled - and on the existence of an allowlisted package from which a relative require can reach a non-allowlisted package whose resolved path shares a leading string prefix with an allowlisted module. Limiting factors: PR:L means the attacker's code is already running inside the sandbox (not a fully external attacker), AC:H/AT:P reflect the required prefix-collision and non-automatable nature, and impact is confined to reaching an extra module (VC:L/VI:L, no availability or subsequent-system impact). It does not, by itself, grant host code execution. |
| Impact | This is a genuinely low-priority issue and the signals are consistent about it, unlike much of the vm2 lineage. The vendor CVSS 4.0 base score is only 2.3 with AV:N/AC:H/AT:P/PR:L/UI:N and impacts capped at VC:L/VI:L/VA:N and no subsequent-system impact (SC:N/SI:N/SA:N) - i.e. a low-impact, hard-to-reach, privilege-requiring, attack-requirement-gated weakness rather than a full sandbox escape. No EPSS score, no CISA KEV listing, and no public POC are present in the provided data, so the correct characterization is 'no public exploit identified at time of analysis.' The AC:H/AT:P combination reflects that exploitation is not automatable and depends on a specific precondition (an allowlisted package that shares a name prefix with a non-allowlisted target and from which a relative require can be performed) plus a non-default configuration (module allowlist enforced with transitive loading disabled). This is best understood as an incremental hardening fix to require-path validation, not an urgent, independently-actionable vulnerability. It is only meaningful within vm2's threat model (an application deliberately runs untrusted JavaScript inside vm2) and even then yields, on its own, only expanded module reachability - potentially a stepping stone toward the more severe escape/RCE issues fixed in the same 3.11.7 release, but not equivalent to them. |
| Exploit ScenarioDerived | An application runs untrusted JavaScript in vm2 with a module allowlist and transitive loading disabled, assuming only the listed packages are reachable. The untrusted code, executing from within an allowlisted package, issues a relative require to a non-allowlisted package whose path shares a string prefix with an allowlisted one, and the raw-prefix check in isPathAllowedForModule wrongly approves it. No public POC or active exploitation is indicated in the provided data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Module allowlist bypass in vm2 before 3.11.7 lets JavaScript that is already executing inside the sandbox load packages the host intended to forbid, by performing a relative require from an allowlisted package to a non-allowlisted package whose resolved path only shares a leading string prefix with an allowlisted module. Exploitation is not remote or automatic: it requires the host application to deliberately run untrusted code in vm2, an enforced module allowlist combined with disabled transitive loading, and a prefix-collision package layout, which is why our independent assessment scores it as a low-severity, high-complexity weakness (CVSS 3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N, attack requirements present) rather than a sandbox escape; there is no public exploit identified at time of analysis and no confirmed active exploitation (no CISA KEV listing).
RemediationAI
Vendor-released patch: 3.11.7 - upgrade vm2 to 3.11.7 or later, and re-verify that the allowlist enforcement path is the patched one; advisory details are at https://github.com/patriksimek/vm2/security/advisories/GHSA-7q3f-wx44-378m and https://www.vulncheck.com/advisories/vm2-before-3.11.7-module-allowlist-bypass-via-prefix-matching. If the upgrade cannot be applied immediately, the effective compensating controls are configuration-level rather than generic hardening: audit the allowlist so that no allowlisted package name is a string prefix of any non-allowlisted package that a relative require from it could resolve to, and separate or rename prefix-colliding packages so their resolved paths no longer share a leading prefix (this costs package-layout churn and must be re-checked on every dependency change). Alternatively, stop relying on the vulnerable non-transitive path by allowing transitive loading, accepting the trade-off that the sandbox may then load a wider set of modules than intended; or wrap the check with an application-side boundary-anchored path validation that compares normalized path segments instead of string prefixes. Avoid issuing relative requires from allowlisted modules where the host controls the code, and treat this as low priority given the assessed impact is limited to reaching one additional module and does not grant host code execution.
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 sandbox library used by host applications that need to execute untrusted JavaScript in-process, and its module allowlist is enforced through an internal isPathAllowedForModule check. That check compares the resolved module path against allowlisted entries using raw string prefix matching rather than a boundary-anchored comparison, so containment is decided by string prefix instead of by path-component boundaries. The CWE-22 mapping reflects this classic pathname-restriction error: '/app/node_modules/foo' as an allowlisted prefix will also accept '/app/node_modules/foo-extra', because no separator or normalized-segment check anchors the match. The bypass is reachable when the allowlist is enforced and transitive loading is disabled, since a relative require issued from within an allowlisted package resolves directly to the prefix-colliding sibling and is then validated with the flawed prefix test. The CVSS 4.0 record (AT:P, AC:H) and our CVSS 3.1 assessment (PR:L meaning the attacker's code is already running inside the sandbox, AC:H/AT:P reflecting the required prefix collision and the non-automatable nature, C:L/I:L with no availability or subsequent-system impact) both describe a configuration-dependent allowlist weakness that does not by itself yield host code execution.
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:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Attacker code already runs in the sandbox (PR:L) and needs a prefix-colliding relative-require path under a non-default allowlist config (AC:H); impact is limited extra module reachability (C:L/I:L, A:N, no scope change).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
vm2 before 3.11.7 contains a module allowlist bypass vulnerability in isPathAllowedForModule that uses raw string prefix matching instead of boundary-anchored comparison. Attackers can reach non-allowlisted packages sharing a prefix with allowlisted modules by performing relative requires from allowlisted packages when transitive loading is disabled.
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
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
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-81594
GHSA-7q3f-wx44-378m
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB