CVE-2026-92950: vm2 CLI provides no sandbox isolation - host-realm require() is reachable from sandboxed scripts
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.
References
- github.com/advisories/GHSA-jxxv-8r27-vm4p
- github.com/patriksimek/vm2/commit/903017c8a1eae9aba947ec854468b48155e79f86
- github.com/patriksimek/vm2/releases/tag/v3.11.7
- github.com/patriksimek/vm2/security/advisories/GHSA-jxxv-8r27-vm4p
- nvd.nist.gov/vuln/detail/CVE-2026-92950
- www.vulncheck.com/advisories/vm2-before-3.11.7-sandbox-escape-via-cli-require
Code Behaviors & Features
Detect and mitigate CVE-2026-92950 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →