Description
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, a sandbox escape vulnerability in vm2 allows arbitrary code execution in the host process when untrusted code is executed with async support on runtimes exposing WebAssembly JSPI (WebAssembly.promising / WebAssembly.Suspending). In the tested configuration, a JSPI-backed Promise can reach Promise.prototype.finally() in a way that bypasses the expected Promise-species hardening and exposes a host-originated rejection object to attacker-controlled species logic, breaking the sandbox boundary. This issue has been patched in version 3.11.4.
Published: 2026-06-12
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

vm2 is a Node.js library that creates virtual machine sandboxes for untrusted code. A flaw in the handling of JSPI‑backed promises allows the sandbox to break its isolation. By exploiting the way Promise.prototype.finally() is called with a host‑originated rejection object that reaches attacker‑controlled species logic, malicious code can be executed outside the isolated environment. The weakness is classified as CWE‑913, giving an attacker full control of the host process.

Affected Systems

The vulnerability applies to all versions of vm2 before 3.11.4. Users running any prior release on Node.js environments that expose WebAssembly JSPI (WebAssembly.promising / WebAssembly.Suspending) and that enable async support are impacted. Version 3.11.4 and later include the patch.

Risk and Exploitability

The CVSS score of 9.8 marks this vulnerability as Critical. The EPSS is reported as less than 1 %, indicating a low probability of exploitation in the wild, and it is not present in the CISA KEV catalog. Nonetheless, the attack can be performed by any code that runs within vm2 in an affected environment, simply by using async features and WebAssembly promises; no additional setup beyond the normal usage of the library is required.

Generated by OpenCVE AI on June 12, 2026 at 15:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade vm2 to version 3.11.4 or later.
  • If an upgrade cannot be performed, remove or disable WebAssembly JSPI from the host runtime and avoid executing untrusted code with async support. In the absence of JSPI, vm2’s sandbox remains safe.
  • Consider replacing vm2 with an alternative sandbox library that does not rely on WebAssembly JSPI or that has been audited for isolation.

Generated by OpenCVE AI on June 12, 2026 at 15:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-6j2x-vhqr-qr7q vm2 sandbox escape via JSPI-backed Promise `.finally()` species bypass
History

Fri, 12 Jun 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Patriksimek
Patriksimek vm2
Vendors & Products Patriksimek
Patriksimek vm2

Fri, 12 Jun 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 12 Jun 2026 14:30:00 +0000

Type Values Removed Values Added
Description vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, a sandbox escape vulnerability in vm2 allows arbitrary code execution in the host process when untrusted code is executed with async support on runtimes exposing WebAssembly JSPI (WebAssembly.promising / WebAssembly.Suspending). In the tested configuration, a JSPI-backed Promise can reach Promise.prototype.finally() in a way that bypasses the expected Promise-species hardening and exposes a host-originated rejection object to attacker-controlled species logic, breaking the sandbox boundary. This issue has been patched in version 3.11.4.
Title vm2 sandbox escape via JSPI-backed Promise `.finally()` species bypass
Weaknesses CWE-913
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-12T16:03:19.960Z

Reserved: 2026-05-18T22:25:21.257Z

Link: CVE-2026-47210

cve-icon Vulnrichment

Updated: 2026-06-12T16:03:15.342Z

cve-icon NVD

Status : Deferred

Published: 2026-06-12T15:16:29.030

Modified: 2026-06-12T17:16:23.987

Link: CVE-2026-47210

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-12T16:30:13Z

Weaknesses
  • CWE-913

    Improper Control of Dynamically-Managed Code Resources