Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit JavaScript to vm2 sandbox
-
DeliveryCall ArrayBuffer/TypedArray constructor with huge N
-
ExploitBypass bufferAllocLimit via V8 intrinsic allocation path
-
ExecutionExhaust host process RSS synchronously
-
ImpactOOM-kill host process (DoS)
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The application must use vm2 (<=3.11.5) to execute untrusted/attacker-controlled JavaScript inside a VM sandbox - this is vm2's normal use case, so no special product configuration is required. The bufferAllocLimit option does NOT need to be set: default |
| Impact | This is a real but bounded issue whose severity is entirely a function of vm2's threat model. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H, score 8.7) is availability-only - VC:N/VI:N confirm no confidentiality or integrity impact, consistent with CWE-770 (uncontrolled resource consumption). The 'network/unauthenticated' framing is technically correct only because vm2's entire purpose is to execute untrusted attacker-supplied JavaScript; the attacker must already be able to run code inside the sandbox, so this is a sandbox resource-control bypass, not a classic remote pre-auth flaw. Exploitation status: publicly available exploit code exists (a working POC is embedded in the GHSA advisory) but there is no EPSS score and no CISA KEV listing, so there is no evidence of active in-the-wild exploitation - POC availability and active exploitation are distinct signals and only the former is present. Practical severity is amplified in memory-constrained deployments (Docker/K8s/Lambda) where a single synchronous allocation can OOM-kill the host process, but limited by the fact that it grants only DoS, not code execution or data theft (contrast the RCE escape in the same product, CVE-2026-92934). Net: a legitimate defense-in-depth bypass worth patching for anyone relying on bufferAllocLimit, but availability-only and gated behind already running attacker JavaScript. |
| Exploit ScenarioDerived | An application uses vm2 to sandbox user-submitted JavaScript and sets bufferAllocLimit expecting memory-abuse protection. An attacker submits |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Memory exhaustion denial of service in vm2 through 3.11.5 lets sandboxed JavaScript escalate beyond the operator-configured bufferAllocLimit by allocating host memory through ArrayBuffer, SharedArrayBuffer, and TypedArray constructors, which the cap never intercepts. Because the allocation is a single synchronous V8 call, vm2's timeout cannot interrupt it, and any deployment that runs untrusted code in a VM - the library's standard use case - is exposed without needing bufferAllocLimit to be enabled at all. Impact is availability-only (CVSS 4.0 8.7; independent assessment CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) and materializes as process OOM-kill, most quickly in memory-capped runtimes such as Docker, Kubernetes, or AWS Lambda; the GHSA advisory ships reproduction code but there is no indication of active exploitation (not listed in CISA KEV), and the issue is resolved in 3.11.6.
RemediationAI
Vendor-released patch: vm2 3.11.6 - the npm package records vulnerable <= 3.11.5 and fixed in 3.11.6, so upgrade to vm2 3.11.6 or later, reinstall dependencies, and pin the resolved version in the lockfile to prevent regression to a vulnerable transitive copy; verify with npm ls vm2 and treat the guidance in GHSA-v836-6xw4-9cx3 and the VulnCheck advisory (https://www.vulncheck.com/advisories/vm2-before-3.11.6-memory-exhaustion-dos-via-bufferalloclimit-bypass) as authoritative. Because the bypass lives in V8 intrinsics rather than in application code, bufferAllocLimit cannot be used as a compensating control on unfixed versions and should not be relied on. Practical mitigations, each with trade-offs, include: enforce hard OS-level memory limits via cgroups/container memory limits with OOM-kill so the host survives (trade-off: the vm2 process itself is killed, converting sandbox escape into a service restart, so combine with restart backoff and rate limiting); isolate each untrusted execution in a short-lived child process with an RSS cap (trade-off: added process-management complexity and latency); and require that untrusted code reach the sandbox only from authenticated, rate-limited sources, since the vulnerability still requires an attacker to submit code into vm2 in the first place (trade-off: does not help products whose purpose is executing user-supplied scripts). Note that --max-old-space-size and similar V8 heap flags do not bound ArrayBuffer backing-store memory and should not be treated as a fix. Keep the sandbox out of nodes holding sensitive credentials so that an OOM-induced restart cannot be chained into further compromise.
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 that runs untrusted JavaScript in a separate V8 realm. In v3.11.0 the project added the bufferAllocLimit option (following GHSA-6785-pvv7-mvg7) and enforced it in setup-sandbox.js via checkBufferAllocLimit() (lines 353-359), capping Buffer.alloc, Buffer.allocUnsafe, Buffer.allocUnsafeSlow and the deprecated Buffer(N)/new Buffer(N) forms. That defense only hooks the Node.js Buffer API. ArrayBuffer, SharedArrayBuffer and every TypedArray constructor (Uint8Array, Float64Array, etc.) are sandbox-realm V8 intrinsics that reach the same underlying C++ allocation path - v8::ArrayBuffer::NewBackingStore → ArrayBufferAllocator::Allocate → calloc/malloc - but are never intercepted, which is the CWE-770 (Allocation of Resources Without Limits or Throttling) root cause: a resource limit is applied to one API surface while equivalent unrestricted paths remain reachable. A single new ArrayBuffer(N) with a large N exhausts host RSS synchronously, and because V8 heap flags such as --max-old-space-size govern the JS heap rather than external ArrayBuffer backing stores, the usual heap cap does not contain the growth. The CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:* confirms the affected package is the upstream patriksimek:vm2 npm module, and the advisory notes the behavior holds on all Node.js versions.
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:N/VA:H/SC:N/SI:N/SA:N
Attacker-supplied sandbox JS reaches the host over the network with no auth or interaction (PR:N/UI:N), single synchronous allocation is trivially reliable (AC:L); impact is host OOM only (A:H, C:N/I:N), no scope change to another component.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
vm2 before 3.11.6 fails to enforce bufferAllocLimit on ArrayBuffer, SharedArrayBuffer, and TypedArray constructors, allowing attackers to allocate arbitrary host memory. Attackers can bypass the buffer allocation cap by using these V8 intrinsics to exhaust host process memory and trigger out-of-memory conditions.
Blast Radius
ecosystem impact- 18 npm packages depend on vm2 (6 direct, 12 indirect)
Ecosystem-wide dependent count for version 3.11.6.
Technical POC Analysis
CWE-770 (Allocation of Resources Without Limits or Throttling).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
The vm2 JavaScript sandbox library, used to safely execute untrusted code, contains a memory exhaustion flaw in versions up to 3.11.5 that allows unauthenticated attackers to crash the host process, causing denial of service. Organizations running vm2 in memory-constrained environments such as Docker, Kubernetes, or AWS Lambda are at immediate risk of service outages, which can disrupt critical business operations. Leadership should prioritize patching to version 3.11.6 to restore availability and prevent avoidable downtime.
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
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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-81611
GHSA-3m4j-9x2m-pq7h
NVD
CVE.org
EPSS
Exploit-DB