Browse / AI Framework and Platform Flaws / CVE-2026-92950
vm2 CLI provides no sandbox isolation - host-realm require() is reachable from sandboxed scripts
- Class
- AI Framework and Platform Flaws (filed by a model that read the advisory)
- Technique
- Sandbox escape
- Affected
- vm2 (npm)
- Gets past
- Sandbox or allowlist
- CVSS
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
- EPSS
- 0.2% chance of exploitation in 30 days
How it works, in short
The CLI runs scripts with external require enabled, so a script can require itself in the host realm and reach fs and child_process. (Our summary, written by a model. The source text is below.)
Details
Summary
The vm2 command-line tool installed by npm install -g vm2 and documented in the README's "CLI" section runs the supplied script under NodeVM with require:{external:true} and no root / context / builtin configured. With these defaults the resolver loads every relative or absolute require() target through the host require() function, executing the attacker's module body in the host Node.js process before the result is ever proxied back into the sandbox. A single attacker-controlled file passed to vm2 ./script.js can call require(__filename) to re-execute itself in host realm and reach fs, child_process, etc. The documented sandbox runner is therefore equivalent to node ./script.js. No additional files, flags, or user interaction are required.
Details
The vulnerability lets a malicious sandboxed script - the file argument to the documented vm2 <file> CLI - execute arbitrary code in the host Node.js process, crossing the sandbox → host boundary that vm2 is meant to enforce.
Vulnerable code path
- Source -
bin/vm2:3→lib/cli.js:7-18.process.argv[2]is the - attacker-authored script path. The CLI invokes: