Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Arbitrary Code Injection vulnerabilities in an interactive lesson.
Start learningUpgrade vm2 to version 3.11.2 or higher.
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules.
Affected versions of this package are vulnerable to Arbitrary Code Injection via the handleException function and the sandbox-side globalPromise.prototype.then wrapper in lib/setup-sandbox.js. An attacker can reach host Function and execute arbitrary code by throwing or resolving a sandbox-realm null-prototype object and then assigning a host function such as Buffer.prototype.inspect to a property on the caught/resolved value. The bridge proxy created for that value writes the raw host function back onto the underlying sandbox object, so the original sandbox reference exposes a host function whose .constructor leads to Function('return process')() and full sandbox escape.
Notes: This issue was introduced as part of the mitigation for CVE-2026-44000