Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit untrusted JS to vm2 sandbox
-
ExploitRead globalThis VM2_INTERNAL_STATE property
-
ExecutionRetrieve internal state object
-
ImpactHarvest sandbox internals for escape
Vulnerability Assessment
| Weakness |
CWE
|
| Exploitation Conditions | Requires that the application embeds vm2 (npm/vm2 < 3.11.2) and executes attacker-controlled or untrusted JavaScript inside a vm2 VM/NodeVM instance - this is vm2's core use case, so no non-default configuration is needed. The single concrete step is the sandboxed script reading globalThis['VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL']. The principal limiting factor is that the attacker must already be able to run code within the sandbox (the assumed vm2 trust boundary); there is no network-facing exploitation independent of that, and impact is limited to disclosure of internal state (no direct code execution, integrity, or availability effect). |
| Impact | This is a genuine but low-severity issue, correctly rated (vendor CVSS 4.0 6.9, confidentiality-only VC:L with VI:N/VA:N and no scope change SC:N). The 4.0 vector shows AV:N/AC:L/AT:N/PR:N/UI:N - trivial to trigger for any actor already permitted to run code in the sandbox, which is the standard vm2 threat model (the sandboxed JS IS the attacker). No EPSS score and no KEV listing are provided, and there is no evidence of active exploitation. However, a working PoC is published directly in the GHSA advisory, so exploit code is public. The impact is bounded: the flaw only discloses vm2's internal state object (VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL) via globalThis - it is information disclosure, not code execution, matching VC:L. Its real significance is as a stepping-stone/reconnaissance primitive: leaking sandbox internals aids the far more serious vm2 escape/RCE chains rather than causing direct harm alone. Notably this is explicitly an incomplete fix of the prior advisory GHSA-wp5r-2gw5-m7q7, a recurring pattern in vm2. Verdict: not an urgent priority in isolation (low confidentiality impact, no active exploitation), but should be patched to 3.11.2+ because any code running under vm2 is by definition untrusted, and this weakens defense-in-depth for the escape CVEs. |
| Exploit ScenarioDerived | An application uses vm2 to run untrusted or third-party JavaScript in a NodeVM/VM sandbox. The attacker-supplied script executes globalThis['VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL'] and receives the internal state object, disclosing sandbox internals it can then use to probe for or build a sandbox-escape. A public PoC exists in the GHSA-2cm2-m3w5-gp2f advisory, and the low attack complexity (AC:L) means it works reliably against any default vm2 instance below 3.11.2. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Untrusted JavaScript running inside a vm2 sandbox before version 3.11.2 can reach the host-side internal state object via globalThis['VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL'], disclosing sandbox internals that were supposed to be invisible to guest code in the npm package vm2. The issue is a re-bypass of the earlier advisory GHSA-wp5r-2gw5-m7q7, and a short working proof-of-concept is published in the vendor advisory GHSA-2cm2-m3w5-gp2f, so publicly available exploit code exists; no CISA KEV listing appears in the supplied intelligence and no EPSS value was provided. The CVSS 4.0 base score is 6.9 with a confidentiality-only impact (VC:L, VI:N, VA:N, SC:N, PR:N, UI:N), consistent with the independent assessment that this is a genuine but low-severity information disclosure with no demonstrated code execution, integrity, or availability effect; the unauthenticated PR:N rating reflects the vector, while in practice the attacker must already be able to execute code inside the vm2 trust boundary (an application that embeds vm2 and runs attacker-controlled scripts).
RemediationAI
Vendor-released patch: vm2 3.11.2 - upgrade the npm dependency (e.g. "vm2": "3.11.2" or later) and regenerate the lockfile so nested/transitive copies are also updated, then redeploy; this is the only complete fix, and because the flaw is a re-bypass of the fix for GHSA-wp5r-2gw5-m7q7, confirm that previously deferred upgrades actually landed. Details and the proof-of-concept are in https://github.com/patriksimek/vm2/security/advisories/GHSA-2cm2-m3w5-gp2f and https://www.vulncheck.com/advisories/vm2-before-3.11.2-information-disclosure-via-internal-state. If you cannot patch immediately, do not treat vm2's process boundary as a security boundary for this class of bug: run each untrusted script in a separate low-privilege child process or container with no credentials, no network egress, and a read-only filesystem, accepting the added latency, memory, and operational overhead; alternatively migrate the untrusted-code use case to a maintained isolate-based runtime (for example an isolate/worker-based executor), which entails a rewrite of the execution harness. Audit application logs and the vm2 internal state itself to determine whether secrets, host paths, or module references reachable through VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL were exposed before patching, and rotate anything that may have leaked.
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 (npm package maintained by patriksimek, CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:*) used to execute untrusted JavaScript inside an isolated VM/NodeVM context. To make that sandbox work, the host injects a privileged internal object under the deliberately scary name VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL, which holds bookkeeping structures the guest is never meant to touch. The fix shipped for the earlier GHSA-wp5r-2gw5-m7q7 advisory was incomplete: the symbol remains reachable from inside the sandbox because the guest global scope still reflects it, so a one-line sandboxed expression such as globalThis['VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL'] returns the internal state object instead of undefined. The catalogued weakness is CWE-227 (improper fulfillment of API contract), which here maps to a broken isolation contract - the library implicitly guarantees that host internals are unreachable from guest code, and that guarantee fails. Practically the root cause is an access-restriction/isolation failure on a privileged symbol (CWE-284-style exposure of a resource to the wrong sphere of control), scoped entirely to confidentiality: the assessed CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N) confirms information disclosure only, with no scope change and no path shown from reading the state object to code execution or sandbox escape.
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:L/VI:N/VA:N/SC:N/SI:N/SA:N
Sandboxed untrusted code (PR:N per vm2 threat model) trivially reads an internal object over a network-exposed service; low confidentiality only, no integrity/availability impact and no base-metric scope change.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
vm2 versions before 3.11.2 fail to properly restrict access to the VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL global variable. Attackers can access this internal state object through globalThis to retrieve sensitive sandbox internals.
Blast Radius
ecosystem impact- 10 npm packages depend on vm2 (4 direct, 6 indirect)
Ecosystem-wide dependent count for version 3.11.2.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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-81613
GHSA-xr25-qx3m-g53h
NVD
CVE.org
EPSS
Exploit-DB