CVE-2026-92940: vm2 Package Exposes Host HTTPS Credentials and TLS Traffic
Summary
CVE-2026-92940: vm2 exposes host HTTPS credentials and TLS traffic through globalAgent. Affects vm2 versions >= 3.11.3, < 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
The vm2 package is a popular Node.js library that provides a sandboxed environment for executing untrusted JavaScript code securely. It allows developers to run code in a controlled context, isolating it from the host environment. However, a critical vulnerability has been identified in version 3.11.6, which exposes the host process's real HTTPS global agent when the NodeVM is allowed to require the 'https' module. This flaw can lead to unauthorized access to sensitive information and potential exploitation.
Vulnerability Detail
The vulnerability arises from the exposure of the host's HTTPS global agent within the vm2 sandbox. When a NodeVM is allowed to require 'https', it can access the shared global agent, which is not adequately isolated. This allows malicious code to listen for events on the agent, capturing sensitive information such as authorization tokens and plaintext responses from the host's HTTPS requests. The exploit can lead to unauthorized actions being performed using stolen credentials, potentially compromising the host application's security.
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 allowing the 'https' module in the NodeVM configuration. Instead, consider using a sandbox-local network module facade to prevent access to the global HTTPS agent. This can be done by modifying the vm2 instantiation as follows: '
const vm = new NodeVM({ require: { external: true, builtin: [] } });
'. This will restrict the NodeVM from accessing the global 'https' module.
Conclusion
The vm2 package has a critical vulnerability that exposes host HTTPS credentials and TLS traffic when the 'https' module is allowed in the NodeVM. It is essential to update to version 3.11.7 or later to mitigate this risk. Additionally, consider using workarounds to enhance security until the update can be applied.
See every vulnerability recorded for vm2 →
FAQ
The CVSS score of this vulnerability is 10.0, indicating a critical severity level.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.
An attacker can steal sensitive information such as authorization tokens, read plaintext response headers, and perform unauthorized actions using stolen credentials.
Yes, you can temporarily avoid allowing the 'https' module in the NodeVM configuration to mitigate the risk until you can update the package.
If immediate updates are not possible, implement the workaround by restricting access to the 'https' module in the NodeVM configuration to minimize exposure.
References
Related vulnerabilities
Recent vulnerabilities recorded for vm2.