Impact
The vulnerability in the vm2 sandbox arises from an exploit that combines multiple JavaScript prototype manipulation techniques involving Buffer.__lookupGetter__ and Buffer.__lookupSetter__, together with a Node.js ERR_INVALID_ARG_TYPE Error. By doing so, an attacker can obtain a reference to the host's TypeError constructor, effectively breaking out of the sandbox and gaining the ability to execute arbitrary code within the host environment. This flaw belongs to CWE‑913, which describes user‑controlled content that can be used to subvert security confines. The consequence of a successful exploit is complete loss of integrity and confidentiality for the system running the affected vm2 instance.
Affected Systems
Any Node.js application that includes the vm2 library version older than 3.11.4 is susceptible to the exploit. The vulnerable code path exists in all releases up to and including 3.11.3 and is present in any deployment that permits untrusted code to be passed to vm2. Users of vm2 prior to the v3.11.4 release should review their dependencies and confirm the version they are running.
Risk and Exploitability
The CVSS score for this vulnerability is 10, indicating maximal severity. While the EPSS score is less than 1%, the exploitation probability remains non‑zero due to the widespread usage of vm2 in development environments, and it is not listed in any current KEV catalog, meaning there have been no publicly confirmed exploit campaigns. The likely attack vector is local or semi‑trusted code that has access to the vm2 library, such as a web application that evaluates user input inside a sandbox. An attacker with the ability to supply code to vm2 can convert the sandbox into a trusted code context, thereby executing arbitrary instructions on the host machine. The failure to contain sandboxed code elevates the risk to complete system compromise.
OpenCVE Enrichment
Github GHSA