Multiple Critical vm2 Sandbox Escapes Enable Host RCE in Node.js
A wave of disclosures has exposed multiple critical flaws in the Node.js sandbox library vm2, showing that untrusted JavaScript can break out of the sandbox and execute commands on the host. GitHub advisories describe several distinct escape paths affecting versions as old as 3.9.6 and, in some cases, up to 3.11.3, including a breakout through Node.js inspect, a Promise species bypass that defeats an earlier patch, prototype pollution through vm2’s bridge to host intrinsic prototypes, and a NodeVM misconfiguration path where nesting: true lets code bypass require: false and load vm2 recursively to reach modules such as child_process. Public proof-of-concepts show attackers recovering the host process object and invoking host commands, turning vm2 from a containment boundary into a route to full host compromise.
Additional reporting and upstream changes indicate the problems are broader than a single bug. Semgrep documented a new sandbox escape, while vm2 maintainers added regression tests covering descriptor- and prototype-traversal techniques used to recover host constructors such as Function, AsyncFunction, and GeneratorFunction, as well as callback sanitization bypasses tied to Promise handling. A later roundup described five critical vulnerabilities with no practical configuration-based workaround for deployments that execute untrusted code, and urged upgrades to vm2 3.11.4 or later. The advisory backlog on the project’s GitHub page shows a concentrated set of newly published sandbox escape, builtin bypass, and host code execution issues, underscoring that organizations relying on vm2 for isolation should treat affected environments as potentially compromised.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
10 events from the most recent confirmed update back to the earliest known activity.
Public reporting summarizes five critical vm2 flaws
Security Online reported that five critical vm2 vulnerabilities affecting versions up to 3.11.3 enable sandbox escape and host RCE, and said organizations should upgrade to vm2 3.11.4 or later because no configuration workaround exists for untrusted code execution.
vm2 publishes ATTACKS.md documenting sandbox escape techniques
The vm2 repository published an ATTACKS.md document cataloging known sandbox escape and breakout techniques affecting the project. The document consolidates technical details on attack chains and serves as project-maintained security documentation for vm2 users and researchers.
GitHub advisory listing shows concentrated vm2 disclosures
The vm2 security advisories page reflected a wave of newly published disclosures in May 2026, highlighting numerous sandbox escape, RCE, builtin bypass, and data leakage issues affecting the library.
GitHub publishes multiple vm2 security advisories
GitHub advisories were published for several vm2 vulnerabilities, including sandbox breakouts through inspect, Promise species handling, prototype pollution-based escapes, and `nesting: true` require bypasses. The advisories describe host command execution and sandbox compromise across affected vm2 versions.
vm2 adds regression tests for sandbox escape techniques
A vm2 commit added security regression tests covering multiple sandbox escape chains involving property descriptors, prototype traversal, host constructor recovery, and Promise callback sanitization bypass attempts.
Semgrep discloses new vm2 sandbox escape
Semgrep published research describing a new sandbox escape affecting the popular Node.js sandbox library vm2, marking public disclosure of a fresh breakout technique.
vm2 fixes CVE-2026-22709 in version 3.10.2
A GitHub Security Advisory published CVE-2026-22709, a critical vm2 sandbox escape caused by improper Promise callback sanitization that could lead to arbitrary code execution outside the sandbox. Maintainers fixed the issue in commit 4b009c2 by replacing Function.prototype.call with Reflect.apply and released vm2 version 3.10.2.
GitHub discloses Proxy-related vm2 sandbox escape
GitHub published a security advisory for a vm2 sandbox escape affecting versions through 3.9.17, caused by unexpected creation of a host object related to Proxy specification behavior. The issue could lead to host remote code execution, had a public proof of concept, and was fixed in vm2 3.9.18 with no workaround provided.
Nesting bypass persisted through vm2 refactor
The `nesting: true` require-bypass issue remained present after a vm2 refactor in commit `9e2b6051`, allowing the vulnerable behavior to continue in later versions.
vm2 nesting flaw introduced in legacy resolver path
A vm2 flaw that lets a NodeVM with `nesting: true` bypass `require: false` was introduced in commit `2353ce60`, which injected `NESTING_OVERRIDE` into the resolver path and exposed `vm2` inside the sandbox.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
16 references tracked. Mallory keeps watching after this page renders.
Five Critical vm2 Vulnerabilities Grant Instant Node.js Host RCE
securityonline.info
Open sourceSecurity Advisories · patriksimek/vm2 · GitHub
github.com
Open sourcevm2/docs/ATTACKS.md at main · patriksimek/vm2 · GitHub
github.com
Open sourceSandbox escape in vm2 · Advisory · patriksimek/vm2 · GitHub
github.com
Open sourceNew Sandbox Escape Affecting Popular nodejs Sandbox library vm2 | Semgrep
semgrep.dev
Open sourceCritical Sandbox Escape in vm2 Enables RCE | Blog | Endor Labs
endorlabs.com
Open sourceSandbox Escape · Advisory · patriksimek/vm2 · GitHub
github.com
Open sourceSandbox Escape in vm2@3.9.15 · GitHub
gist.github.com
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


