Intel

AIKIDO-2026-754094

vm2 is vulnerable to Remote Code Execution

Remote Code ExecutionGHSA-jxxv-8r27-vm4p Published Yesterday

86

High Risk

This Affects:

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

TL;DR

The bundled command-line interface runs scripts with NodeVM.file() using require.external but without setting require.root, require.context, or require.builtin. The resolver allows all paths when no root is configured and executes host-realm require(). A script run through the CLI calls require(__filename) to re-execute itself, running its module body in the host Node.js process before any result is proxied back. This grants arbitrary code execution with access to the filesystem, child processes, and environment. The fix gives the CLI a restricted default configuration.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you execute untrusted scripts through the vm2 command-line interface.

Background info

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

How to fix this

Upgrade the vm2 library to the patch version.