Intel

AIKIDO-2026-736136

vm2 is vulnerable to Remote Code Execution

Remote Code ExecutionGHSA-8hr7-r645-pc6w Published 2 days ago

90

Critical Risk

This Affects:

JSvm2
3.11.4 - 3.11.6
Fixed in 3.11.7
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

vm2 is vulnerable to Remote Code Execution in versions 3.11.4 - 3.11.6.

How to fix this

Upgrade the vm2 library to the patch version.