Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit malicious JS to vm2 sandbox
-
DeliveryWalk prototype chain to host TypedArray/ArrayBuffer prototypes
-
ExploitMutate host Uint8Array/%TypedArray%/ArrayBuffer.prototype
-
ExecutionVM.run() returns to host
-
PersistHost typed arrays observe attacker properties
-
ImpactCorrupt host data integrity/availability
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 | Exploitation requires that the host application embed vm2 (versions 3.11.0 through 3.11.7) and execute attacker-controlled JavaScript inside a VM/NodeVM sandbox, then subsequently create or operate on host-side TypedArray/ArrayBuffer instances whose polluted prototype properties are observable. The vulnerability is inherent to any such configuration (no non-default option is named as a prerequisite), but it is fundamentally gated by the vm2 usage model: applications that do NOT run untrusted code in vm2, or that never touch host typed arrays after sandbox execution, are not exploitable. The limiting factor is therefore the deliberate deployment of vm2 as an untrusted-code sandbox - not a special feature flag. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N, VI:H/VA:H plus subsequent-system SI:H/SA:H) rates this 9.3 Critical, reflecting a sandbox-escape-class prototype pollution where mutations to host TypedArray/ArrayBuffer prototypes persist into the host realm after VM.run() returns - a genuine scope change affecting the subsequent (host) system. However, this is a library-embedded vulnerability whose real-world risk is entirely conditional on the vm2 threat model: it only matters where an application deliberately executes untrusted/attacker-supplied JavaScript inside a vm2 sandbox and later handles host-created typed arrays. There is no EPSS score, no CISA KEV listing, and no explicitly published exploit in the provided data (a working technique is likely described in the GHSA advisory but is not confirmed as standalone POC). Notably, the vendor tags this 'Information Disclosure', which directly conflicts with the CVSS vector setting VC:N (no confidentiality impact) - the actual impact is integrity and availability, so treat the tag as mislabeled. One data caveat: the stated fix version 3.11.8 does not match vm2's public release history (the project stopped around 3.9.19 and was deprecated in 2023), so the version metadata should be verified against the advisory. Net: a legitimately high-severity flaw for the narrow population that still runs vm2 with untrusted code, but not a broad internet-facing emergency absent that specific usage. |
| Exploit ScenarioDerived | An application uses vm2 (3.11.0-3.11.7) to run untrusted user-supplied JavaScript - e.g. a code playground, template evaluator, or serverless function runner. Malicious sandboxed code walks prototype chains to reach and mutate host Uint8Array.prototype/%TypedArray%.prototype/ArrayBuffer.prototype, so that after VM.run() returns, host code operating on its own typed arrays observes attacker-controlled properties, corrupting host-side data handling or logic. No public standalone exploit is confirmed, though the GHSA advisory likely details the prototype-walking primitive. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Prototype pollution in the vm2 Node.js sandbox (versions 3.11.0 through 3.11.7) lets JavaScript running inside a VM/NodeVM instance walk the prototype chain into host-realm intrinsics and mutate Uint8Array.prototype, %TypedArray%.prototype, and ArrayBuffer.prototype, so the pollution survives after VM.run() returns and is observed by host-created typed arrays. Because the vm2 usage model is to execute untrusted code, the CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N, VI:H/VA:H plus SI:H/SA:H) yields a 9.3 Critical sandbox-escape-class rating: unauthenticated remote attackers who can supply the sandboxed script can reach the host realm, though the impact is only realized if the host application subsequently creates or operates on host-side TypedArray/ArrayBuffer instances. No public exploit code was identified at time of analysis and the issue is not listed as confirmed actively exploited (CISA KEV), so risk is driven by upstream supply-chain exposure of applications embedding vm2 as an untrusted-code boundary. The vulnerability was reported by VulnCheck and is tracked under CWE-913.
RemediationAI
Vendor-released patch: upgrade vm2 to 3.11.8 or later, which is the first version outside the affected 3.11.0-through-3.11.7 range; confirm the resolved version in your lockfile (npm ls vm2) because the fix is transitive for many consumers. If immediate upgrade is not possible, treat vm2 as a non-isolating sandbox and move untrusted execution out of premise: run the untrusted script in a separate OS process or container with resource and filesystem limits rather than in-process with vm2, or switch to an isolate-backed runtime (for example Node's worker_threads with a separate isolate or isolated-vm), accepting the added latency and IPC complexity that comes with process/isolate boundaries. As an in-process stopgap, freeze the intrinsic prototypes before executing untrusted code (Object.freeze(Uint8Array.prototype), Object.freeze(ArrayBuffer.prototype), and the shared %TypedArray%.prototype) so subsequent writes from the sandbox throw instead of persisting - the trade-off is that this is a process-wide change and can break libraries or application code that legitimately add properties or polyfills to typed-array prototypes, and it must be applied before any untrusted execution and re-applied if prototypes are re-created. Additionally, avoid creating or consuming host-side TypedArray and ArrayBuffer instances with attacker-influenced property access after VM.run() returns (copying results through JSON serialization or an explicit allowlist of properties avoids reading polluted prototype attributes), and audit host code paths that iterate or read typed-array properties after sandboxed execution. Consult GHSA-3vgf-8m4q-q4qr (https://github.com/patriksimek/vm2/security/advisories/GHSA-3vgf-8m4q-q4qr) and the VulnCheck advisory (https://www.vulncheck.com/advisories/vm2-3.11.0-through-3.11.7-prototype-pollution-via-typedarray) for vendor guidance; no public exploit code was identified at time of analysis, but the absence of published exploit code should not be treated as a reason to delay the upgrade because the affected versions remain the current dependency range in many deployments.
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 widely embedded npm library that runs untrusted JavaScript inside Node.js with a proxy-based membrane intended to isolate the sandbox realm from the host. The CWE-913 root cause class (Improper Control of Dynamically-Managed Code Resources) manifests here through improper control of dynamically-determined object attributes: the sandbox's prototype-walking protections do not cover the typed-array intrinsic prototypes, so primitives that traverse the prototype chain can reach and modify host-realm objects such as Uint8Array.prototype, %TypedArray%.prototype, and ArrayBuffer.prototype. Unlike a simple denial-of-service pollution, these are shared intrinsic objects, so the mutation persists beyond the sandboxed execution and is visible to code running afterwards in the host realm. CPE data (cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:*) identifies the patriksimek:vm2 package as the sole affected component, with the version range stated as 3.11.0 through 3.11.7. The scope-change (S:C in the assessor's CVSS 3.1 view) reflects that the vulnerable component (the sandbox) and the impacted component (the host process and any typed-array consumers it serves) are distinct - an escape of the untrusted-code boundary rather than a defect confined to the sandbox itself.
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:N/VI:H/VA:H/SC:N/SI:H/SA:H
Sandboxed untrusted code (PR:N, AV:N, AC:L) mutates host prototypes crossing the sandbox boundary (S:C) with no confidentiality but high integrity/availability impact on the host.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
vm2 versions from 3.11.0 before 3.11.8 fail to protect host TypedArray and ArrayBuffer prototypes from sandbox mutation. Attackers can use prototype-walking primitives to reach and modify host Uint8Array.prototype, %TypedArray%.prototype, and ArrayBuffer.prototype, causing host-created typed arrays to observe attacker-controlled properties after VM.run() returns.
Technical POC Analysis
Prototype pollution / incomplete host-intrinsic protection.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Organizations that embed the vm2 Node.js sandbox (versions 3.11.0 through 3.11.7) to run untrusted JavaScript face a critical isolation failure: an unauthenticated remote attacker who can supply the sandboxed script may escape into the host realm and mutate host-side typed-array and ArrayBuffer prototypes. No vendor-released patch identified at time of analysis, and no public exploit identified at time of analysis, so leadership should treat any service that executes third-party or user-supplied code via vm2 as a high-priority risk to application integrity and availability.
No vendor-released patch identified at time of analysis; interim mitigations include removing or disabling vm2 3.11.0-3.11.7 for untrusted code, running untrusted scripts in separate low-privilege processes or containers, restricting script input to trusted sources, and monitoring for anomalous TypedArray/ArrayBuffer prototype changes.
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
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-81602
GHSA-5v7w-95g5-pj6q
NVD
CVE.org
EPSS
Exploit-DB