Multiple Critical vm2 Sandbox Escapes Enable Host RCE in Node.js Environments
Vulnerability Disclosure · 18 sources · Updated 5mo ago · First seen Jun 12, 2026

The vm2 Node.js sandboxing library was hit by a wave of critical sandbox-escape vulnerabilities that let attackers executing untrusted JavaScript break out and run arbitrary commands on the host. Reported flaws include CVE-2026-24120, which bypasses an earlier Promise-species mitigation to reach the host Function constructor; CVE-2026-24118, which abuses __lookupGetter__, Buffer.apply, and prototype traversal; CVE-2026-24781, which leverages inspect proxy unwrapping; CVE-2026-26332, which pivots through SuppressedError; and CVE-2026-26956, which uses WebAssembly JSTag exception handling on Node.js 25+. Across the advisories, affected versions span the 3.10.x branch and earlier, with several issues requiring only the ability to submit code to a vm2 instance and no authentication or user interaction.
The project responded with security releases v3.10.5 and v3.11.0, with v3.11.0 closing 13 advisories including sandbox escapes, denial-of-service bugs, information disclosure, and prototype pollution. Maintainers also patched a separate NodeVM issue tracked as GHSA-m4wx-m65x-ghrr, where enabling nesting: true with omitted or falsy require settings could expose the vm2 package inside the sandbox and lead to host remote code execution. The releases added broader hardening measures such as bufferAllocLimit, stricter handling of dangerous built-ins, and filesystem checks, while maintainers warned that organizations using vm2 to run fully untrusted code should upgrade immediately and avoid treating in-process JavaScript sandboxing as a sole security boundary.
Why it matters
Impact assessment
vm2 users that execute untrusted or semi-trusted JavaScript inside Node.js are directly affected, especially code-execution platforms, SaaS automation backends, online IDEs, plugin systems, and any service embedding VM or NodeVM as an isolation boundary. The impact is severe because multiple flaws enable sandbox escape to host remote code execution, allowing file access, process spawning, secret theft, and full compromise of the application host process.
Exposure is broad for organizations running vm2 versions before the fixed releases, but practical reachability depends on whether attackers can submit code to a vm2 instance or, for some NodeVM issues, whether risky options such as require.builtin or nesting are enabled. Public proof-of-concept exploit paths are described across several advisories, but the provided references do not cite confirmed in-the-wild exploitation.
Affected populations and products
- vm2, the Node.js sandboxing library
- VM and NodeVM deployments that run attacker-controlled JavaScript
- Applications using vm2 as a primary isolation boundary for untrusted code
- NodeVM deployments with
require.builtinallowingprocess,inspector/promises, or* - NodeVM deployments with
nesting: true, especially with omitted or falsyrequire - Node.js 25+ environments are additionally exposed to the WebAssembly
JSTagescape path
Severity and business impact
- Host remote code execution from sandboxed JavaScript
- Theft of environment variables, credentials, and application secrets
- Read/write access to host files from the compromised process context
- Child process spawning and arbitrary OS command execution
- Potential service disruption from denial-of-service issues also fixed in vm2 security releases
- Reputational and compliance impact if multi-tenant code execution environments are compromised
Scope and exploitation status
- Affected versions span
3.10.xand earlier, plus multiple issues affecting3.11.0through3.11.3and all versions prior to3.11.4 - Several issues require only the ability to submit JavaScript to a vm2 sandbox, with no authentication or user interaction
- Public advisories include exploit mechanics and proof-of-concept details for multiple sandbox escapes
- No explicit evidence of active exploitation in the wild is provided in the references


