Impact
vm2 is an open-source JavaScript virtual machine designed to sandbox Node.js code. The flaw arises from an unsafe use of the __lookupGetter__ method, allowing code executed inside the vm2 sandbox to escape and execute arbitrary commands on the host system. This represents a classic code injection weakness (CWE‑94) combined with inadequate isolation controls (CWE‑693). If exploited, an attacker could compromise the entire host environment, gaining full read/write/execute privileges.
Affected Systems
The issue affects the patriksimek vm2 package in all releases prior to version 3.11.0. Systems that incorporate the older vm2 library and provide untrusted code to the sandbox are vulnerable. The vulnerability was fixed in vm2 releases starting at v3.11.0.
Risk and Exploitability
The vulnerability has a CVSS score of 9.8, indicating critical severity. No EPSS score is available, and it is not listed in the CISA KEV catalog. The likely attack vector is a user who can supply code to vm2; via malicious exploitation of __lookupGetter__, that code can break out of the sandbox. The exploit requires the attacker to run within a Node.js process that includes vm2, so it may be local or remote depending on how the library is exposed. Timely patching is essential due to the high impact of remote code execution.
OpenCVE Enrichment