Impact
vm2, an open source sandbox for Node.js, contains a flaw that allows code running in a default or inherited NodeVM to mutate shared host prototypes such as Object.prototype, Array.prototype, and Function.prototype. The vulnerability arises from mutable proxies exposed by the bridge and the use of otherReflectSet and otherReflectDefineProperty to forward sandbox writes to host objects. An attacker controlling JavaScript in the sandbox can therefore alter fundamental JavaScript behavior in the host environment, potentially enabling arbitrary code execution or other privilege escalation within the host process.
Affected Systems
The affected product is vm2 version 3.9.6 through 3.10.5, distributed by patriksimek. The vulnerability is present in these releases and has been addressed in version 3.11.0. Any deployment of vm2 within this range without an upgrade is susceptible.
Risk and Exploitability
The CVSS score of 10 indicates critical severity, and the EPSS score is not available but the vulnerability is not listed in the CISA KEV catalog. A likely attack vector is an application that supplies attacker-controlled JavaScript to a default VM or inherits a NodeVM, thereby exploiting the bridge to modify host prototypes. Because the flaw permits direct mutation of the host environment, exploitation can lead to full host process compromise if not mitigated.
OpenCVE Enrichment
Github GHSA