Impact
vm2 provides an isolated environment for executing JavaScript code within Node.js. In versions prior to 3.10.2, the library sanitizes the callback of local Promise objects but not that of the global Promise prototype. As a result, an attacker can craft a Promise chain that bypasses the sanitization routine, causing code to run outside the intended sandbox boundaries. This vulnerability is an instance of improper resource limitation, contextual integrity violation, and command injection as identified by Common Weakness Enumerations 693, 913, and 94 respectively. The escalation enables unrestricted execution of malicious payloads, potentially compromising confidentiality, integrity, and availability of the host system.
Affected Systems
Any installation of the patriksimek:vm2 project on Node.js that uses a version earlier than 3.10.2 is subject to this flaw. The vulnerability is tied specifically to the vm2 sandbox component and does not affect other parts of the Node.js runtime unless they incorporate the unpatched vm2 dependency.
Risk and Exploitability
The flaw carries a CVSS score of 9.8, indicating critical severity, while the EPSS suggests a very low, yet non-zero probability of exploitation (<1%). The vulnerability is not listed in the CISA KEV catalog. Exploitation would generally require an attacker to supply malicious JavaScript to a sandboxed environment, a scenario common in npm package execution or plugin systems. Once the unsanitized global Promise is invoked, the attacker gains control to execute arbitrary code on the host Node.js process.
OpenCVE Enrichment
Github GHSA