vm2 is vulnerable to Sandbox Escape
99
Critical Risk
When the node:test builtin is allowlisted, the prefix-stripping logic removes only a single node: prefix, so requesting node:node:test resolves to the real host module past the read-only proxy. Sandboxed code calls the host test runner's run() with a controlled execArgv. This spawns unrestricted child processes with arbitrary evaluation arguments, giving full code execution under the host identity. The fix corrects prefix normalization so the doubled form cannot reach the host module.
You are affected if you are using a version that falls within the vulnerable range and you allow the node:test builtin in the sandbox and you run Node.js 24 or later.
vm2 is vulnerable to Sandbox Escape in versions 3.9.6 - 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