Impact
The vulnerability exists in the vm2 sandbox library prior to version 3.12.2, where the construct trap omits host-side Promise rejection handling. When an embedder registers a constructable host function whose constructor returns a native rejected Promise, code executed in the sandbox can invoke this function with the JavaScript "new" operator, bypassing the missing sanitization. The rejected Promise propagates across the VM boundary as unhandled, and Node.js’s strict unhandled‑rejection policy causes it to be escalated to an uncaught exception, which terminates the host process. The attacker therefore gains the ability to force a sandboxed script to shut down the entire Node.js application without needing elevated privileges within the host environment.
Affected Systems
This issue affects the patriksimek:vm2 package in every release before 3.12.2. Hosts that embed vm2 and run untrusted code via VM.run or a similar API are at risk. The vulnerability is independent of the host application's version but becomes mitigated once the library is updated to 3.12.2 or later.
Risk and Exploitability
The CVSS score of 8.9 classifies the flaw as high severity. While the EPSS score is not available, the nature of the flaw—allowing sandbox code to terminate the hosting process—makes exploitation likely in environments that run unchecked VM code. The vulnerability is not listed in the CISA KEV catalog, but its impact on process availability and the ease of triggering it via a constructable host function warrant immediate attention. The most probable attack vector is the execution of untrusted JavaScript within a vm2 sandbox that can call a host function returning a rejected Promise.
OpenCVE Enrichment