VM2 Sandbox Breakout via Async Generator
A sandbox breakout vulnerability exists in vm2, tracked as CVE-2026-45411, allowing attackers to execute arbitrary commands on the host system by manipulating async generators to catch host exceptions, leading to remote code execution.
CVE search metadata
CVE search record: CVE-2026-45411. Severity: critical. CVSS: 9.8. EPSS: 0.05%. KEV: no. Product: vm2 (<= 3.11.2). Brief: VM2 Sandbox Breakout via Async Generator. Brief link: https://feed.craftedsignal.io/briefs/2026-05-vm2-sandbox-breakout/
Triage facts
Revision 1- Applicability
- vm2 (<= 3.11.2)
- Evidence
- Unknown
- Severity
- Critical
- Sources
- 2 public sources
- Freshness
- Revision 1May 29, 17:41 UTC
- Detection
- 1 rule
- Vulnerabilities
- 1 CVE
A critical sandbox breakout vulnerability has been identified in vm2, a popular Node.js sandbox environment. This flaw, identified as CVE-2026-45411, allows malicious code to escape the confines of the vm2 sandbox and execute arbitrary commands on the host system. The vulnerability stems from the improper handling of exceptions within async generators, specifically when using the yield* expression. This allows attackers to catch host exceptions and manipulate the execution flow to achieve code execution outside the sandbox. The affected versions are vm2 versions 3.11.2 and earlier. This vulnerability poses a significant risk to applications relying on vm2 for secure code execution, potentially leading to complete system compromise.
Attack Chain
- The attacker provides malicious JavaScript code to the vm2 sandbox.
- The malicious code defines an async generator function that utilizes the
yield*expression. - The code triggers a host exception within the sandbox environment.
- The exception is caught within the async generator using a specially crafted iterator.
- The attacker manipulates the caught exception object to access host objects and functions.
- This access is used to bypass the sandbox restrictions.
- The attacker gains access to the
child_processmodule. - The attacker executes arbitrary commands on the host system using
child_process.execSync().
Impact
Successful exploitation of this vulnerability allows attackers to perform Remote Code Execution (RCE) on the host system. This can lead to a complete compromise of the affected system, including data theft, system corruption, and further propagation of malicious activity. Given the popularity of vm2 in sandboxing untrusted JavaScript code, a wide range of applications and systems could be at risk if they are using versions 3.11.2 or earlier.
Recommendation
- Upgrade to vm2 version 3.11.3 or later to patch CVE-2026-45411.
- Deploy the Sigma rule "Detect VM2 Sandbox Breakout via Async Generator" to your SIEM to detect potential exploitation attempts.
- Implement strict input validation and sanitization to minimize the risk of malicious code being introduced into the vm2 sandbox.
Detection coverage 1
Detect VM2 Sandbox Breakout via Async Generator
criticalDetects CVE-2026-45411 exploitation — Attempts to exploit VM2 sandbox breakout using async generators and exception handling to execute arbitrary code on the host system.
Detection queries are available on the platform. Get full rules →