Junglewise Threat Intelligence

CVE-2026-92940: vm2 HTTPS credential exposure via globalAgent

CVE-2026-92940 · Severity: critical · CVSS 10 · Published 2026-09-17

Technologies: Patriksimek Vm2.

Executive brief

vm2 is a popular Node.js sandboxing library used to safely execute untrusted JavaScript code in isolated environments. Versions 3.11.3 through 3.11.6 expose the host process's real HTTPS agent to sandboxed code, allowing attackers to steal sensitive credentials (authorization tokens, cookies, API keys), intercept unencrypted response data on reused HTTPS connections, discover private internal service addresses, and impersonate the host application to perform unauthorized authenticated actions against backend services.

Technical details

The vulnerability is a resource exposure (CWE-668) in vm2's builtin module loader. When a NodeVM is explicitly configured to allow require('https'), the loader wraps the https module in a read-only proxy. However, method calls on the proxy (such as Agent.prototype.on()) are forwarded to the underlying host https.globalAgent singleton instead of a sandbox-local instance. An attacker can register an event listener on the real agent's 'free' event, which fires when the host application reuses pooled HTTPS connections. The listener receives unfiltered access to live TLSSocket objects and request options (including Authorization headers), enabling plaintext interception of subsequent responses and theft of credentials for use in forged authenticated requests. No preconditions beyond NodeVM instantiation with https explicitly enabled are required; the vulnerability is network-reachable if the host makes HTTPS requests while the sandbox is active. The fix is available in version 3.11.7.

Affected products

  • Patriksimek vm2 3.11.3 through 3.11.6

Timeline

  • 2026-08-24: disclosed: GitHub Security Advisory GHSA-h85j-hv3c-qfgq published
  • 2026-09-17: disclosed: CVE-2026-92940 and NVD publication
  • 2026: patched: Fixed in vm2 version 3.11.7

References