vm2 is vulnerable to Remote Code Execution
90
Critical Risk
NodeVM's constructor validates the require configuration for the nesting feature with a check that treats arrays as valid object configuration. When an array is supplied as the require value, the resolver is built with only the nesting override and no path restrictions. Sandboxed code can then load the host vm2 module, construct an inner NodeVM with arbitrary builtin permissions, and run commands in the host process. The fix rejects array-shaped require configuration so the nesting guard no longer accepts it.
You are affected if you are using a version that falls within the vulnerable range and your application enables the nesting option with an array-shaped require configuration.
vm2 is vulnerable to Remote Code Execution in versions 3.11.4 - 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