vm2 is vulnerable to Sandbox Escape
100
Critical Risk
The streaming WebAssembly APIs return a promise whose machinery is host-realm rather than sandbox-realm, so a host-realm rejection bypasses the sandbox's promise hardening. Using Promise.prototype.finally together with species control, sandboxed code captures the host error object. It then reaches the host Function constructor through the error's constructor chain to recover the host process object and escape the sandbox. The fix removes the streaming WebAssembly compile and instantiate functions from the sandbox.
You are affected if you are using a version that falls within the vulnerable range and you run untrusted code on Node.js 26 where the sandbox can reach the streaming WebAssembly APIs.
vm2 is vulnerable to Sandbox Escape in versions 3.10.1 - 3.11.6.
Upgrade the vm2 library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant