vm2 CVE-2026-44006
CRITICALAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSubmit crafted JavaScript to vm2 sandbox
-
DeliveryTrigger util.inspect with malicious stylize callback
-
ExploitLeak BaseHandler.getPrototypeOf from bridge internals
-
InstallTraverse prototype chain to host Object constructor
-
C2Extract Buffer.prototype internal symbols
-
ExecuteCraft symbol-keyed object triggering WebAssembly.compileStreaming inspection
-
ImpactExecute child_process.execSync as host process
-
Step 8Achieve arbitrary code execution
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the target application to execute attacker-controlled JavaScript code within a vm2 sandbox instance running on Node.js. No special vm2 configuration is required - default sandbox settings are vulnerable. The attack works against vm2's standard VM and NodeVM modes. Specific Node.js built-in modules (Buffer, util, WebAssembly) must be accessible, which is true in default vm2 configurations. Attack succeeds remotely over network if the application accepts untrusted code input via HTTP APIs, WebSocket connections, or stored user scripts. No authentication or user interaction needed beyond the ability to submit JavaScript for execution. The vendor-provided PoC demonstrates the exploit works in standard vm2 deployments without requiring non-default settings or obscure deployment configurations. |
| Impact | Critical real-world risk confirmed across all signals. CVSS 10.0 (maximum severity) with network attack vector, no authentication, no user interaction, and scope change reflecting full sandbox escape. Vendor-published proof-of-concept demonstrates complete compromise chain from crafted JavaScript to arbitrary shell command execution. Fixed in coordinated security release addressing 13 sandbox escape vulnerabilities simultaneously, indicating vm2's sandboxing model had systemic weaknesses. No EPSS or KEV data provided, but public PoC in vendor advisory guarantees reproduction capability. Any deployment running untrusted JavaScript code in vm2 <=3.10.5 faces immediate RCE risk - vendor explicitly states 'embedders running untrusted code should upgrade.' Attack complexity is low despite sophisticated exploit chain because PoC provides turnkey weaponization. This represents complete failure of security boundary. |
| Exploit ScenarioDerived | An attacker submits malicious JavaScript code to a web application that evaluates user input using vm2 for sandboxing (common in code playgrounds, serverless functions, or plugin systems). The attacker's payload creates crafted objects mimicking Buffer methods and passes a malicious stylize callback to trigger util.inspect processing. This leaks the BaseHandler, allowing prototype chain traversal to obtain host-realm constructors. The attacker then crafts an object with symbol-keyed properties that execute when WebAssembly.compileStreaming inspects it, invoking child_process.execSync to run arbitrary shell commands with the privileges of the Node.js process. The attacker achieves full server compromise, data exfiltration, or lateral movement within the infrastructure. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 07, 2026
Prototype chain manipulation in vm2 Node.js sandbox library enables complete sandbox escape and remote code execution via util.inspect handler leakage. Attackers can exploit BaseHandler.getPrototypeOf through crafted objects to access host process primitives and execute arbitrary system commands. Public exploit code exists (vendor-published PoC demonstrates child_process.execSync execution). Fixed in vm2 version 3.11.0 alongside 12 other critical sandbox escape vulnerabilities in coordinated security release.
RemediationAI
Upgrade to vm2 version 3.11.0 immediately, as confirmed in the vendor release notes at https://github.com/patriksimek/vm2/releases/tag/v3.11.0. This coordinated security release patches 13 distinct sandbox escape vulnerabilities including this prototype chain manipulation issue. No workarounds exist that maintain sandbox integrity - the underlying bridge architecture required fundamental redesign. If immediate upgrade is impossible, stop executing untrusted code in vm2 entirely and migrate to isolated-vm or OS-level sandboxing (Docker containers, VMs, gVisor). Disabling specific Node.js features is insufficient because multiple independent escape vectors existed. The new 3.11.0 release also introduces bufferAllocLimit configuration to mitigate heap exhaustion DoS attacks - review and configure this limit based on your trust model. Note that vm2 maintainers later deprecated the entire project in 2023 due to ongoing security challenges, recommending migration to isolated-vm for production use cases requiring untrusted code execution.
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 JavaScript sandbox library for Node.js that isolates untrusted code execution. The vulnerability exploits the bridge mechanism between sandboxed and host realms. By chaining Buffer.prototype methods with custom objects containing a malicious stylize callback passed to util.inspect, attackers reach the internal BaseHandler's getPrototypeOf trap. This allows traversing the prototype chain to obtain host-realm Object constructor, extracting internal symbols from Buffer.prototype, then crafting objects with symbol-keyed properties that execute when WebAssembly.compileStreaming triggers internal inspection. The exploit abuses CWE-94 Improper Control of Generation of Code, specifically prototype pollution combined with constructor access to break out of the VM's realm isolation and invoke Node.js child_process APIs directly.
Know when the next one hits your stack
- 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
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Primary rating from Vendor (https://github.com/patriksimek/vm2).
CVSS VectorVendor: https://github.com/patriksimek/vm2
DescriptionCVE.org
Summary
It is possible to reach BaseHandler.getPrototypeOf, which can be used to get arbitrary prototypes
Details
https://github.com/patriksimek/vm2/blob/408fc855f1cc1bbc2985b029465ee0e732ada433/lib/bridge.js#L655-L658
BaseHandler can be reached via util.inspect (same as https://github.com/patriksimek/vm2/commit/57971fa423abeb66f09e47e18102986549474ca8)
PoC
let obj = {
subarray: Buffer.prototype.inspect,
slice: Buffer.prototype.slice,
hexSlice: () => '',
};
let sym;
obj.slice(10, {
showHidden: true,
showProxy: true,
depth: 10,
stylize(a) {
const handler = this.seen && this.seen[1];
if (handler && handler.getPrototypeOf) {
gP = handler.getPrototypeOf;
HObjectProto = gP(gP(gP(gP(Buffer))));
HObject = HObjectProto.constructor;
sym = HObject.getOwnPropertySymbols(Buffer.prototype).at(0);
}
return a;
},
});
obj = {
[sym]: (depth, opt, inspect) => {
inspect.constructor('return process')()
.getBuiltinModule('child_process')
.execSync('id', { stdio: 'inherit' });
},
valueOf: undefined,
constructor: undefined,
};
WebAssembly.compileStreaming(obj).catch(() => {});Impact
Sandbox Escape -> RCE
Executive ViewAI
CVE-2026-44006 is a critical remote code execution vulnerability in the vm2 Node.js sandbox library that allows complete bypass of sandbox isolation through prototype chain manipulation, enabling attackers to execute arbitrary system commands on affected servers. Organizations using vm2 for code isolation or sandboxing face immediate risk of full system compromise if untrusted code execution is enabled. This requires urgent remediation as public exploit code is available and the vulnerability carries a maximum CVSS score of 10.0.
Vendor-released patch: vm2 version 3.11.0. No interim mitigation recommended-upgrade is mandatory. If immediate upgrade is not possible, discontinue all untrusted code execution via vm2 until patched; consider disabling affected functionality or migrating to alternative sandboxing solutions.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
GHSA-qcp4-v2jj-fjx8
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB