Code Injection in vm2 - CVE-2026-44006
Published: May 4, 2026
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary code.
The vulnerability exists due to improper control of code generation in BaseHandler.getPrototypeOf in vm2/lib/bridge.js when processing crafted objects through util.inspect and WebAssembly.compileStreaming. A remote attacker can send specially crafted input to escape the sandbox and execute arbitrary code.
The issue can be triggered by reaching BaseHandler via util.inspect to obtain arbitrary prototypes.