CVE-2026-92940: vm2 exposes host HTTPS credentials and TLS traffic through globalAgent
Summary
vm2 3.11.6 exposes the host process’s real https.globalAgent when a NodeVM is explicitly allowed to require https. The module is wrapped as read-only, but calls to methods on the shared agent still mutate the host object. Sandbox code can register a free listener and receive host request options and the host TLS socket whenever an unrelated host HTTPS request releases a pooled connection.
In a contained test, sandbox code allowed only the https builtin:
- read the host request’s bearer token from the agent event;
- attached a data listener to the released host TLS socket and read the next host response body in plaintext;
- learned the private service host and port;
- sent an attacker-chosen authenticated POST using the stolen host token; and
- received confirmation that the service accepted the action.
The host application never passed its credentials, request, response, socket, or destination into the sandbox. They crossed the boundary solely because vm2 exposes the process-global HTTPS agent instead of a sandbox-local network module instance.
References
- github.com/advisories/GHSA-h85j-hv3c-qfgq
- github.com/patriksimek/vm2/commit/aa146a77f859325e079f3bfbfe6d8309af483daa
- github.com/patriksimek/vm2/releases/tag/v3.11.7
- github.com/patriksimek/vm2/security/advisories/GHSA-h85j-hv3c-qfgq
- nvd.nist.gov/vuln/detail/CVE-2026-92940
- www.vulncheck.com/advisories/vm2-3.11.3-through-3.11.6-https-credential-exposure-via-globalagent
Code Behaviors & Features
Detect and mitigate CVE-2026-92940 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 →