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

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

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.

Technologies: vm2 (npm). Vendors: npm.

Quick answers

Is CVE-2026-92940 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-92940 being exploited in the wild.
How severe is CVE-2026-92940?
Critical severity, with a CVSS score of 10, published 17 September 2026.
Which products and versions are affected?
vm2 (npm) >= 3.11.3, <= 3.11.6, SEMVER:introduced=3.11.3,fixed=3.11.7.
Is there a fix for CVE-2026-92940?
Yes. vm2 (npm): upgrade to 3.11.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-92940 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-92940?
Check whether you run vm2 (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • vm2 (npm): upgrade to 3.11.7 or later
    npm install vm2@3.11.7

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

Identifiers

  • CVE-2026-92940
  • GHSA-h85j-hv3c-qfgq

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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.