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.
OpenCVE Enrichment
Github GHSA