Impact
The vulnerability in vm2 allows an attacker to call BaseHandler.getPrototypeOf, exposing arbitrary prototypes to the sandbox. This flaw, classified as CWE-94, enables the attacker to escape the sandbox boundary and potentially execute arbitrary code within the host Node.js process. Because the sandbox is intended to isolate malicious scripts, this escape undermines the confidentiality, integrity, and availability of the encompassing application.
Affected Systems
The affected product is the vm2 sandbox library distributed by patriksimek. All released versions prior to 3.11.0 are vulnerable. The library is commonly used to execute untrusted JavaScript code in a controlled Node.js environment.
Risk and Exploitability
The CVSS score of 10.0 indicates critical severity, and the absence of an EPSS entry suggests limited publicly available exploitation data, yet the inherent risk remains high. The flaw is listed as not in the CISA KEV catalog, but its impact is steep enough that any application that relies on vm2 to sandbox untrusted input is at risk. The likely attack vector is through the injection of crafted code that invokes BaseHandler.getPrototypeOf, which can be triggered by any code that exercises vm2's API for executing user content. The vulnerability allows local or remote attackers to achieve full process compromise when the sandbox is used in environments where it is assumed to be isolated.
OpenCVE Enrichment
Github GHSA