Critical vm2 Sandbox Escape Enables Arbitrary Code Execution in Node.js
Vulnerability Disclosure · 3 sources · Updated 4mo ago · First seen Jan 29, 2026

A critical sandbox-escape flaw in the Node.js library vm2 allows attackers to bypass protections around Promise.prototype.then and Promise.prototype.catch, break out of the sandbox, and execute arbitrary code on the host. The vulnerability, tracked as CVE-2026-22709 with a CVSS 9.8 score, affects vm2 3.10.0 and earlier and strikes at the library’s core purpose of safely running untrusted JavaScript. Users were urged to upgrade immediately to vm2 3.10.2 or later.
The disclosure follows broader concerns about vm2’s long-term viability after repeated sandbox escapes and a prior GitHub advisory describing additional flaws that could lead to remote code execution. Semgrep reported that the project was later discontinued after maintainers concluded vm2’s dependence on Node’s vm module and JavaScript proxy behavior made the sandboxing model fundamentally difficult to secure. The maintainer recommended isolated-vm as an alternative, while warning signs around maintenance and ecosystem support continue to raise risk for organizations that rely on JavaScript sandboxing libraries.
Why it matters
Impact assessment
CVE-2026-22709 is a critical exposure for any organization that uses vm2 to execute untrusted or semi-trusted JavaScript in Node.js applications. The impact is host-level arbitrary code execution after sandbox escape, which can lead to full application compromise, data theft, service disruption, and downstream lateral movement depending on the privileges of the Node.js process.
The exposure is potentially widespread because vm2 has been broadly adopted across the JavaScript ecosystem, but practical risk is concentrated in environments that actively run attacker-controlled code, plugins, templates, or user-supplied scripts inside vm2. No confirmed in-the-wild exploitation is stated in the provided references, but the CVSS 9.8 rating, low-complexity escape path, and vm2’s history of repeated sandbox escapes make this a high-priority remediation case.
Affected populations
- Organizations running Node.js services that use vm2 for sandboxing untrusted JavaScript
- SaaS platforms with plugin, workflow, automation, templating, or custom-script features
- Multi-tenant application environments relying on vm2 as a security boundary
- Development platforms, CI/CD tooling, and internal services that evaluate user-provided JavaScript
Severity and business impact
- Critical severity: CVSS 9.8
- Security boundary failure in the library’s core function
- Arbitrary code execution on the host after sandbox escape
- Potential outcomes:
- Data exposure from application memory, files, secrets, and environment variables
- Operational disruption from service takeover or destructive command execution
- Financial and reputational damage if customer workloads or tenant isolation are affected
Scope and exposure context
- Affects vm2 version 3.10.0 and earlier
- Exposure is broad at ecosystem level due to high adoption of vm2
- Highest risk where vm2 processes externally influenced code paths
- Additional strategic risk exists because references indicate long-term concerns about vm2’s security model and project viability
Structured facts extracted
- Entity: vm2
- Entity: Node.js
- Entity: Patrick Simek
- Entity: isolated-vm
- CVE: CVE-2026-22709
- CVSS: 9.8
- Advisory: GHSA-99p7-6v5w-7xg8
- Affected versions: vm2 3.10.0 and earlier
- Fixed version: vm2 3.10.2 or later
- Known impact: sandbox escape, arbitrary code execution
- Exploitation status in references: no explicit confirmed in-the-wild exploitation reported


