Description
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.3, it is possible to catch a host exception using the yield* expression inside an async generator. When the generator is closed using the return function, the value is awaited on and exceptions thrown in the then call will be caught by the runtime and passed to the yield* iterator as the next value. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. This vulnerability is fixed in 3.11.3.
Published: 2026-05-13
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

vm2 is an open‑source sandbox for Node.js. The vulnerability involves catching a host exception through the yield* expression inside an async generator. When the generator is closed, the returned value is awaited, and if the promise’s then handler throws, the exception is caught by the runtime and injected as the next value of the yield*. This behavior allows an attacker to inject code that escapes the vm2 sandbox and runs arbitrary commands on the host. The weakness is an improper restriction of operations within the sandbox boundaries, classified as CWE‑668.

Affected Systems

The affected product is patriksimek’s vm2. All releases prior to version 3.11.3 are vulnerable.

Risk and Exploitability

The CVSS score of 9.8 marks the vulnerability as critical. No EPSS data is available, but the high severity indicates substantial risk. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector involves executing malicious Node.js code that creates an async generator within a vm2 instance; the attacker must supply the offending code to the sandbox. Once in effect, arbitrary system commands can be executed, compromising confidentiality, integrity, and availability of the host.

Generated by OpenCVE AI on May 13, 2026 at 19:52 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade vm2 to version 3.11.3 or later, which contains the fix for the async generator sandbox escape.
  • If an upgrade cannot be performed immediately, avoid creating async generators inside vm2 or restrict the fields that may be passed to yield* within the sandbox.
  • Validate that the upgraded library is correctly loaded and that all code paths use the patched version before returning to production use.

Generated by OpenCVE AI on May 13, 2026 at 19:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-248r-7h7q-cr24 vm2 Has a Sandbox Breakout Using Async Generator
History

Thu, 14 May 2026 18:30:00 +0000

Type Values Removed Values Added
First Time appeared Vm2 Project
Vm2 Project vm2
CPEs cpe:2.3:a:vm2_project:vm2:*:*:*:*:*:node.js:*:*
Vendors & Products Vm2 Project
Vm2 Project vm2

Wed, 13 May 2026 20:15:00 +0000

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

Wed, 13 May 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 13 May 2026 18:00:00 +0000

Type Values Removed Values Added
Description vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.3, it is possible to catch a host exception using the yield* expression inside an async generator. When the generator is closed using the return function, the value is awaited on and exceptions thrown in the then call will be caught by the runtime and passed to the yield* iterator as the next value. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. This vulnerability is fixed in 3.11.3.
Title vm2: Sandbox Breakout Using Async Generator
Weaknesses CWE-668
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-05-15T03:56:00.842Z

Reserved: 2026-05-12T01:48:40.452Z

Link: CVE-2026-45411

cve-icon Vulnrichment

Updated: 2026-05-13T18:07:16.172Z

cve-icon NVD

Status : Analyzed

Published: 2026-05-13T18:16:19.427

Modified: 2026-05-14T18:19:40.790

Link: CVE-2026-45411

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-13T20:00:04Z

Weaknesses