Critical vm2 Sandbox Escapes Expose Node.js Hosts to Arbitrary Code Execution
Vulnerability Disclosure · 13 sources · Updated 5mo ago · First seen May 7, 2026

Researchers disclosed a broad set of critical flaws in the vm2 Node.js sandbox library that allow untrusted JavaScript to break isolation and execute arbitrary code on the host system. Reports describe 11 to 12 vulnerabilities affecting versions across the 3.9.6 to 3.11.1 range, with most rated CVSS 9.8 to 10.0, and impacting core protections such as built-in allowlists, object handling, prototype traversal, Promise species behavior, util.inspect, Module._load(), WebAssembly exception handling, and unsafe nesting: true configurations. One tracked issue, CVE-2026-24118, is a sandbox breakout through __lookupGetter__ in versions prior to 3.11.0, enabling host-level command execution with no privileges or user interaction.
The disclosures reinforce long-running concerns that vm2's JavaScript-only isolation model is not dependable for high-risk use cases such as multi-tenant code execution, plugin evaluation, automated grading, and serverless workloads. While some reports recommend upgrading to vm2 3.11.2 for the latest protections, others note that CVE-2026-44008 and CVE-2026-44009 remain unpatched and argue that organizations handling untrusted code should consider stronger isolation boundaries such as containers or microVMs. Successful exploitation could expose environment variables, credentials, and files, and enable full compromise of the underlying Node.js host and potential lateral movement.
Why it matters
Impact assessment
vm2 users that execute attacker-controlled or tenant-supplied JavaScript are directly affected, especially SaaS code runners, plugin platforms, CI/CD services, automated grading systems, and serverless-style Node.js workloads. Impact is critical because successful exploitation breaks sandbox isolation and enables arbitrary command execution on the underlying host with the privileges of the Node.js process, exposing secrets, files, environment variables, and creating lateral movement risk.
Exposure is broad across vm2 versions from 3.9.6 through 3.11.1, although practical exploitability depends on whether the application actually runs untrusted code inside vm2. The reporting describes multiple working sandbox escapes and proof-of-concept host command execution, but the provided sources do not cite confirmed in-the-wild exploitation incidents.
Affected populations and products
- Product: vm2 Node.js sandbox library
- High-risk use cases: multi-tenant code execution, plugin evaluation, CI pipelines, automated grading, serverless functions, code execution platforms
- Affected versions reported across disclosures: 3.9.6 through 3.11.1, with issue-specific ranges below
Severity and business consequences
- Sandbox escape negates vm2's core security purpose
- Host-level arbitrary code execution can lead to:
- credential and secret exposure
- filesystem access
- arbitrary shell command execution
- operational disruption of the Node.js host
- pivoting to adjacent internal systems
- Severity reported as critical across most issues, with CVSS commonly 9.8 to 10.0
Scope and exploitation status
- Scope is potentially widespread wherever vm2 is used to isolate untrusted JavaScript
- Risk is lower where vm2 is only installed as a dependency but never instantiated, or only used for trusted internal scripts
- Sources include multiple proof-of-concept exploits demonstrating host command execution, including root-level execution in a test environment for one issue
- No explicit confirmation of exploitation in the wild was provided in the source set


