CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-92940

CVE-2026-92940: Host-Realm Credential Exposure and Socket Hijacking via globalAgent in vm2

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 2, 2026·9 min read·31 visits

Executive Summary (TL;DR)

A sandbox escape in vm2 (versions 3.11.3 to 3.11.6) allows untrusted code to access and hook the host process-wide http/https globalAgent. This enables unauthenticated attackers to steal sensitive headers (like Bearer tokens) and hijack active sockets during unrelated host-realm requests.

A critical vulnerability in the Node.js sandbox library vm2 allows sandboxed code to retrieve the process-wide http.globalAgent and https.globalAgent singletons. By attaching event listeners to these host-realm emitters, sandboxed code can intercept host-realm network requests, capturing sensitive Authorization headers and hijacking active TLSSocket streams.

Vulnerability Overview

CVE-2026-92940 describes a critical security vulnerability within the popular Node.js sandboxing library vm2 affecting versions 3.11.3 through 3.11.6. The core library is designed to isolate untrusted JavaScript execution from the host operating environment and runtime. However, when a NodeVM is configured to allow built-in network modules, a structural gap in how those modules are wrapped allows the sandbox to access sensitive host objects.

This vulnerability falls under the category of host-authority built-in members surviving the read-only wrap, cataloged as CWE-668 (Exposure of Resource to Wrong Sphere). When the sandbox loads either the http or https built-in Node.js modules, the loader wraps the module in a read-only proxy. This wrapping mechanism fails to intercept references to the process-wide globalAgent instance.

Because the globalAgent object is a shared thread-wide EventEmitter that manages the connection pool for all outgoing connections in the Node.js process, its exposure is critical. Any sandboxed code allowed to import the http or https modules can capture this singleton. Consequently, the sandboxed code can register event listeners to tap into connection events executed by the host process.

The resulting impact is a highly severe escape vector where untrusted sandboxed code intercepts plaintext communication and active transport-layer security (TLS) sockets. An attacker running code inside the sandbox can monitor all host-initiated HTTPS requests. This monitoring allows the collection of sensitive request headers, such as authentication tokens, cookies, and target destination details, without disrupting host operations.

Root Cause Analysis

The root cause of CVE-2026-92940 lies in the architectural design of vm2's bridge layer (lib/bridge.js) and builtin module loader (lib/builtin.js). To permit the restricted use of native Node.js core modules, vm2 uses a read-only wrapper function (vm.readonly()) that wraps host-realm objects before delivering them to the sandboxed runtime. This wrapper intercepts object property mutations (assignments) to prevent the sandbox from modifying host objects, but it allows property reads and method calls.

While property assignment is effectively blocked by the read-only proxy, invoking a method on the wrapped object bypasses assignment barriers because the method invocation is forwarded directly to the underlying host object. Because http.globalAgent and https.globalAgent are process-wide singletons inheriting from EventEmitter, calling methods like .on() or .addListener() directly registers callback functions in the host realm. These callbacks execute with full host authority when events are emitted.

When a host-realm HTTPS request completes, the connection socket is returned to the pool, triggering the 'free' event on the global agent. The globalAgent then fires the event and passes the active TLSSocket along with the original request options object to all registered listeners. Because the sandbox successfully attached its listener to the shared host singleton, it receives these arguments directly, crossing the security boundary without triggering proxy exceptions.

A compounding factor is the default behavior of parameterless or standard calls to https.request() or https.get() within the host environment. Under normal circumstances, if a request does not explicitly supply an agent parameter, Node.js implicitly defaults to using the shared https.globalAgent. This structural architecture ensures that almost all host-initiated outbound traffic utilizing default configurations is routed through the very singleton the sandbox can monitor.

Code Analysis and Containment Gaps

Prior to the patch implemented in version 3.11.7, the builtin module registration logic in lib/builtin.js registered core modules directly using the readonly wrapper without member-level sanitization. The vulnerable path evaluated the module import as follows:

// Vulnerable path in lib/builtin.js prior to v3.11.7
builtins.set(key, special ? special : vm => vm.readonly(hostRequire(key)));

This allowed the sandbox to retrieve the direct reference of hostRequire('https'), exposing the shared https.globalAgent without neutralization.

The remediation introduced in commit aa146a77f859325e079f3bfbfe6d8309af483daa implements member-level neutralization via a newly introduced sanitizeBuiltinMembers function. This function intercepts the http and https modules during loading and replaces the real, process-wide globalAgent with a fresh, sandboxed-dedicated Agent instance that has no exposure to host-realm activities.

// Neutralization mechanism in lib/builtin.js
function makeHttpAgentSanitizer(agentKey) {
  return function sanitizeHttpModule(mod) {
    if (typeof mod.Agent !== 'function' || !mod[agentKey]) return mod;
    const copy = Object.assign({}, mod);
    const sandboxAgent = new mod.Agent();
    // The exposed globalAgent is replaced with a sandbox-dedicated one
    copy[agentKey] = sandboxAgent;
    
    // Overwrite request and get to prevent fallback to host globalAgent
    const hostRequest = mod.request;
    const hostGet = mod.get;
    if (typeof hostRequest === 'function') {
      copy.request = function request(...args) {
        return hostRequest.apply(this, requestArgsWithDefaultAgent(args, sandboxAgent));
      };
    }
    if (typeof hostGet === 'function') {
      copy.get = function get(...args) {
        return hostGet.apply(this, requestArgsWithDefaultAgent(args, sandboxAgent));
      };
    }
    return copy;
  };
}

The patch also resolves a red-teaming bypass technique. If a sandboxed script makes an outbound connection using https.request() without specifying an agent, the returned request object (ClientRequest) normally references the host's globalAgent via req.agent. The patched wrapper intercepts request and get calls, wrapping the arguments using requestArgsWithDefaultAgent to explicitly inject the sandboxAgent. This ensures that even the request's internal agent pointer refers to the sandboxed agent rather than the host singleton.

Exploitation Methodology

Exploitation of this vulnerability requires that the target application runs the vm2 sandbox in a configuration that allows the native http or https built-in modules. If the NodeVM is initialized with { require: { builtin: ['https'] } }, the attack surface is exposed. No authentication or privileged network position is required within the sandbox to invoke the exploit; any execution path capable of running arbitrary JavaScript can execute the attack payload.

The attack sequence begins when the sandboxed script requires the https module and retrieves the https.globalAgent reference. The attacker registers an event listener for the 'free' event via https.globalAgent.on('free', callback). This function call executes through the read-only proxy directly onto the host's EventEmitter, successfully establishing a callback handler inside the host realm.

When any unrelated, high-privilege thread in the host process issues an outbound request (such as communicating with a payment processor, fetching configuration, or executing a backend API call), the request is processed using the host's shared globalAgent. Once the request finishes and the TLS socket is released back to the idle pool, the host emitter triggers the 'free' event, calling the sandbox's listener and passing the original request's options object along with the raw TLSSocket object.

Upon receiving these parameters, the sandboxed callback extracts the options object, which contains the target hostname, port, and request headers—frequently containing Authorization: Bearer <token> or session cookies. Additionally, because the active TLSSocket is passed, the attacker can register raw data stream listeners on the socket itself. This allows the attacker to read the incoming response payload in plaintext or construct arbitrary write commands on the connection stream.

Impact & Consequences

The impact of CVE-2026-92940 is categorized as critical, receiving a CVSS v3.1 base score of 10.0 and a CVSS v4.0 base score of 10.0. The CVSS vector highlights an attack complexity of low, no privileges required, and a high impact across confidentiality, integrity, and availability. Crucially, the vulnerability features a 'Scope: Changed' (S:C) designation, reflecting the successful breach of the sandbox boundary to compromise the host runtime context.

In multi-tenant environments, such as Serverless Function-as-a-Service (FaaS) platforms, online code editors, or SaaS automation tools where untrusted user-supplied scripts are executed, this flaw represents an absolute compromise of tenant isolation. A malicious user can execute code that silently monitors host-process network traffic, effectively harvesting credentials and API keys belonging to other tenants or the host infrastructure itself.

The exposure is not limited to passive credential harvesting. Because the attacker gains direct access to the live TLSSocket objects used by the host application, the integrity of subsequent communications is entirely compromised. Attackers can hijack existing secure sockets, inject arbitrary commands, or manipulate outbound data streams, causing cascading security failures throughout connected internal APIs and third-party services.

Although the EPSS score indicates a relatively low probability of mass internet exploitation (0.47%), this is characteristic of development-focused library flaws rather than exposed edge-routing hardware. The risk remains acute and immediate for any enterprise architecture utilizing vm2 to process untrusted scripts, requiring immediate isolation or deprecation of the library.

Remediation & Defense

The definitive remediation for CVE-2026-92940 is to upgrade the vm2 dependency to version 3.11.7 or later. This version introduces the module-level sanitization routines that completely disconnect the sandboxed http and https modules from the host's shared global agents. Security administrators should immediately audit all dependency trees and lockfiles (e.g., package-lock.json or yarn.lock) to verify the absence of vulnerable vm2 versions.

If immediate patching is not feasible, organizations must implement strict temporary workarounds. Developers should audit the configuration of the NodeVM instance and remove both 'http' and 'https' from the list of permitted built-in modules. If the sandbox does not require native network access, disabling these built-ins entirely eliminates the attack vector.

If outbound network requests are an absolute business requirement, teams should implement outbound request handling outside the sandbox boundary. Rather than permitting native networking inside vm2, the host application can expose a highly restricted custom API function to the sandbox that performs well-defined and strictly validated network calls. This design pattern completely removes the need to import native network modules inside the untrusted context.

Finally, it is crucial to recognize that the vm2 project has been officially discontinued and deprecated due to systemic design limitations in Node.js that prevent robust, single-process JavaScript sandboxing. Security teams must transition from vm2 to modern isolation solutions. Recommended alternatives include migrating to isolated-vm, which leverages native V8 Isolate boundaries, or running untrusted code in fully containerized micro-virtual machines (such as AWS Firecracker) with restricted network configurations.

Fix Analysis (1)

Technical Appendix

CVSS Score
10.0/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L
EPSS Probability
0.47%
Top 61% most exploited

Affected Systems

vm2 (npm package)

Affected Versions Detail

Product
Affected Versions
Fixed Version
vm2
patriksimek
>= 3.11.3, <= 3.11.63.11.7
AttributeDetail
CWE IDCWE-668: Exposure of Resource to Wrong Sphere
Attack VectorNetwork (AV:N)
CVSS v3.1 Score10.0 (Critical)
EPSS Score0.00474 (Percentile: 38.70%)
ImpactHost Credential Disclosure & Transport Socket Hijacking
Exploit StatusProof-of-Concept (PoC) available via official regression test suite
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1005Data from Local System
Collection
CWE-668
Exposure of Resource to Wrong Sphere

The product construction allows a resource to be exposed to an actor that is outside of the intended control boundary, resulting in information leakage or unauthorized operations.

Known Exploits & Detection

GitHub Security AdvisoryDetails the vulnerability report, the architectural mechanism of the escape, and provides the reproduction script used as verification.

Vulnerability Timeline

Official security patch addressing globalAgent exposure is integrated into the vm2 master branch.
2026-08-22
GitHub Security Advisory GHSA-h85j-hv3c-qfgq is formally published.
2026-09-17
CVE-2026-92940 is officially assigned and published in global databases.
2026-09-17
EPSS score calculation is finalized and published for CVE-2026-92940.
2026-10-01

References & Sources

  • [1]GHSA-h85j-hv3c-qfgq Security Advisory
  • [2]VulnCheck Vulnerability Report
  • [3]Official Patch Commit
  • [4]vm2 v3.11.7 Release Tag
  • [5]NVD CVE-2026-92940 Details

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-128087
3.7

CVE-2026-128087: Premature Key Exchange Callback Invocation Prior to Host Key Verification in russh

CVE-2026-128087 (GHSA-9264-jvgf-6w2f) is an incorrect behavior order (CWE-696) and improper authorization (CWE-863) vulnerability in the russh Rust SSH library, affecting versions 0.55.0 through 0.65.0. During the initial SSH key exchange (KEX) handshake, the client state machine invokes the client::Handler::kex_done() callback—providing the negotiated raw shared secret bytes—prior to validating the remote server's host key or certificate via check_server_key(). Consequently, an untrusted or rogue SSH server can complete cryptographic key agreement and force a connecting client to execute side-effecting application logic inside kex_done() before the server's identity is checked and rejected.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-128082
7.5

CVE-2026-128082: Uncontrolled Recursion and Denial of Service in AutoMapper via Constructor Parameter Mapping

CVE-2026-128082 (GHSA-6vhm-j9h7-f9gh) is an uncontrolled recursion vulnerability (CWE-674) in AutoMapper, a convention-based object-object mapper for .NET. When mapping nested or self-referential types into destination models that rely on parameterized constructors, C# positional records, or recursive ConstructUsing expressions, AutoMapper evaluates child constructor arguments prior to incrementing the parent's recursion depth counter. This ordering flaw bypasses both explicit MaxDepth limits and the default depth limit of 64. An unauthenticated remote attacker can supply deeply nested input payloads to affected endpoints, exhausting the thread call stack and triggering an uncatchable System.StackOverflowException that terminates the hosting .NET process.

Amit Schendel
Amit Schendel
7 views•11 min read
•1 day ago•CVE-2026-128080
5.8

CVE-2026-128080: Sensitive Query Parameter Disclosure on Incoming Server Spans in OpenTelemetry JavaScript (@opentelemetry/instrumentation-http)

An information exposure vulnerability in the @opentelemetry/instrumentation-http package for OpenTelemetry JavaScript versions 0.204.0 prior to 0.222.0 causes incoming HTTP server spans to record raw, unredacted query string parameters under the url.query attribute. While outgoing client spans applied built-in and user-configured query parameter redaction, incoming server spans bypassed this sanitization completely, resulting in the transmission of sensitive credentials such as pre-signed cloud URLs and API tokens to external observability backends.

Alon Barad
Alon Barad
7 views•10 min read
•1 day ago•CVE-2026-128089
7.5

CVE-2026-128089: Uncontrolled Resource Consumption in dnspython WKS Record Parser

CVE-2026-128089 is an uncontrolled resource consumption vulnerability in the dnspython toolkit for Python, affecting all versions prior to 2.9.2. When parsing Well-Known Service (WKS) records from text via dns.rdtypes.IN.WKS.WKS.from_text(), the parser fails to validate that numeric service port identifiers fall within the RFC 1035 valid range of 0 through 65535. An attacker capable of supplying untrusted zone files or RDATA text strings containing an arbitrarily large service port integer can force the parser to allocate an unbounded bitmap array using an inefficient linear append loop, resulting in severe CPU exhaustion, application hangs, or Out-Of-Memory (OOM) process termination.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-126347
3.1

CVE-2026-126347: Open Redirect via Triple-Slash Redirect Paths in Tornado RedirectHandler

CVE-2026-126347 (GHSA-5cjw-f85j-cv6r) is an open redirect vulnerability (CWE-601) in Tornado, an asynchronous Python networking library and web framework. The flaw resides in tornado.web.RedirectHandler when dynamic URL redirection templates incorporate unvalidated user input. Due to a parser differential between RFC 3986 (used by Python's urllib.parse.urlsplit) and the WHATWG URL Standard (used by modern web browsers), inputs containing three or more leading slashes bypass Tornado 6.6.0's validation logic, allowing unauthenticated attackers to redirect users to arbitrary external domains.

Alon Barad
Alon Barad
8 views•11 min read
•2 days ago•CVE-2026-128123
5.9

CVE-2026-128123: Uncaught Exception and Denial of Service in SvelteKit @sveltejs/adapter-node

A Denial of Service (DoS) vulnerability exists in @sveltejs/adapter-node versions 5.5.7 and 6.0.0-next.0 through 6.0.0. When a SvelteKit server route returns a direct response from a fetch() call with a Content-Type of text/event-stream, the Node.js adapter attempts to mutate the response headers to disable proxy buffering. Because headers returned directly by the WHATWG Fetch API carry an immutable guard, this mutation throws an unhandled TypeError, terminating the underlying Node.js process and denying service to all active and subsequent clients.

Alon Barad
Alon Barad
8 views•9 min read