CVE-2026-92950: vm2 CLI Lacks Sandbox Isolation, Allowing Host Realm Access
Summary
CVE-2026-92950: vm2 CLI provides no sandbox isolation - host-realm require() is reachable from sandboxed scripts. Affects vm2 versions < 3.11.7. Fixed in 3.11.7. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
vm2 is a popular Node.js library that provides a sandboxed environment for executing untrusted code. It allows developers to run scripts securely by isolating them from the host environment. However, the vm2 command-line interface (CLI) has a critical vulnerability that undermines this isolation, exposing the host Node.js process to potential attacks.
Vulnerability Detail
The vm2 CLI runs scripts with the 'require:{external:true}' option and without any root, context, or builtin configurations. This allows attacker-controlled scripts to access the host's require function, enabling them to execute arbitrary code in the host environment. The vulnerability arises from the lack of proper path restrictions, allowing any filesystem path to be accessed. As a result, a malicious script can perform actions such as file manipulation or executing child processes, leading to severe security risks.
How To Fix
Latest published version: 3.12.2 as of 22 Oct 2026
npm install vm2@3.12.2
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
3.11.7
This is the first release that contains the fix.
npm install vm2@3.11.7
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using the vm2 CLI with untrusted scripts. Instead, consider using the library programmatically with proper configurations to enforce sandboxing. For example, you can set up a NodeVM with specific root paths and context to limit access to the host environment.
Conclusion
The vm2 CLI vulnerability (CVE-2026-92950) poses a significant risk by allowing untrusted scripts to execute arbitrary code in the host environment. It is crucial to update to the patched version (3.11.7) to mitigate this risk and ensure the security of your applications.
See every vulnerability recorded for vm2 →
FAQ
The vulnerability has a CVSS score of 8.6, indicating a high level of severity.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Simply upload your package-lock.json file to check for vulnerabilities.
Running an untrusted script can lead to arbitrary code execution in the host Node.js process, compromising the security of your application.
While the best solution is to update to the patched version, you can avoid using the CLI with untrusted scripts and configure the library programmatically to enforce stricter sandboxing.
You can find detailed information in the official GitHub advisory and the vm2 documentation.
References
Related vulnerabilities
Recent vulnerabilities recorded for vm2.