Oct 1, 2026·6 min read·16 visits
An incomplete blocklist of Node.js-internal symbols in vm2 (3.11.4-3.11.6) allows sandboxed code to access host-realm stream symbols, corrupt stream state accessors on the host, and bypass security gates.
A high-severity sandbox escape and state corruption vulnerability exists in the vm2 library (versions 3.11.4 through 3.11.6). The vulnerability is caused by an incomplete blocklist of Node.js-internal registered symbols crossing the sandbox-host bridge boundary. Specifically, the filters in `lib/setup-sandbox.js` and write traps in `lib/bridge.js` omitted the symbols `nodejs.stream.disturbed` and `nodejs.stream.errored`, allowing untrusted code within the sandbox to corrupt host-realm stream state checks.
The vm2 library is designed to run untrusted JavaScript code in a sandboxed V8 isolate environment within a Node.js process. To facilitate communication between the restricted sandbox and the host environment, vm2 establishes a bridge governed by JavaScript Proxies. These proxies intercept operations like property access, object definition, and function execution to ensure sandbox isolation.
An essential requirement of this architecture is the complete isolation of internal metadata from crossing the boundary. Node.js uses specific globally registered Symbol objects, such as those prefixed with nodejs., to designate internal object states across realms. If a sandboxed script can access these internal symbols, it can leverage proxy write traps to override or inject properties directly onto live objects in the host environment.
In modern Node.js runtimes (Node.js 18+), internal state indicators for Web Streams are stored on ReadableStream.prototype utilizing symbols. Due to omission in the symbol sanitization lists of vm2 versions 3.11.4 through 3.11.6, untrusted sandboxed code can extract host-realm symbols and manipulate the internal state checks of host-visible stream instances.
The root cause of this vulnerability lies in the missing sanitization of the global symbols Symbol.for('nodejs.stream.disturbed') and Symbol.for('nodejs.stream.errored') within the vm2 bridge. These specific symbols are used by Node.js internally to keep track of whether a web stream has been read, cancelled, or has entered an error state.
When standard stream operations are evaluated, the Node.js helper function stream.Readable.isDisturbed() evaluates whether a stream's content has already been consumed. It achieves this by reading the internal state accessor matching the symbol nodejs.stream.disturbed. If this property evaluates to a truthy value, the helper confirms the stream is consumed, preventing subsequent reads and enforcing single-consumption rules.
Because the vm2 proxy bridge failed to include these symbols in its static filtering list, sandboxed code could enumerate the symbols present on ReadableStream.prototype. After extracting the real symbol, the sandbox can issue a write command via Object.defineProperty on a host-realm stream instance. This defines an "own" property on the host stream instance with the value false, shadowing the prototype getter. When the host environment subsequently calls isDisturbed(), the nullish coalescing operator short-circuits on the shadowed false value, leading the host to believe the stream is unconsumed.
The vulnerability was resolved in version 3.11.7 via commit a45444d5abbdfa59055528f584df5f21cc7c42da. Instead of continuously updating a static list of dangerous symbols, the maintainers implemented a generalized namespace-based catch-all verification mechanism.
At bootstrap time, pristine references to runtime operations are cached before any untrusted sandbox code execution can compromise them. Specifically, Symbol.keyFor and String.prototype.startsWith are secured:
// In lib/bridge.js
const thisSymbolKeyFor = Symbol.keyFor;
const thisStringPrototypeStartsWith = String.prototype.startsWith;The check function isDangerousCrossRealmSymbol was modified to intercept all registered symbols that reside within the reserved nodejs. namespace. This namespace-based approach closes the recurring maintenance gap that previously required updating explicit lists for individual Node.js versions:
function isDangerousCrossRealmSymbol(key) {
if (typeof key !== 'symbol') return false;
// Resolve the global registration key for the symbol
const nsKey = thisSymbolKeyFor(key);
// If the symbol is registered and starts with 'nodejs.', block it
if (typeof nsKey === 'string' && thisReflectApply(thisStringPrototypeStartsWith, nsKey, ['nodejs.'])) return true;
return (
key === thisSymbolNodeJSUtilInspectCustom ||
key === thisSymbolNodeJSRejection ||
// ... traditional fallback checks
);
}A similar change was mirrored within lib/setup-sandbox.js inside the isDangerousSymbol function to ensure that extraction techniques utilizing getOwnPropertySymbols or Reflect.ownKeys are stripped of any nodejs. namespace symbols before surfacing back to the sandboxed runtime.
To execute this sandbox escape, the sandboxed environment must have access to a host-exposed stream prototype or an instance of a web stream. The attack consists of three distinct phases: symbol extraction, target instantiation, and property shadowing.
First, the attacker inspects the prototype of a web stream, extracting its symbol array:
const streamProto = ReadableStream.prototype;
const targetSymbol = Object.getOwnPropertySymbols(streamProto)
.find(sym => sym.description === 'nodejs.stream.disturbed');Second, the sandboxed attacker target-defines this symbol on an active, fully consumed stream exposed from the host realm. By setting the descriptor value to false, the attacker intercepts the prototype getter:
Object.defineProperty(hostStream, targetSymbol, {
value: false,
configurable: true
});When the hosting environment processes the stream, checks like stream.Readable.isDisturbed(hostStream) evaluate the shadowed value and erroneously return false. This allows the sandboxed application to manipulate state-dependent application logic, bypass integrity constraints, and force the host program to reuse read-once stream bodies.
The CVSS v4.0 rating assigns this vulnerability a base score of 8.9 (High Severity), reflecting the significant integrity impact on hosting systems. The vulnerability violates core sandbox isolation boundaries, allowing low-privilege script execution layers to corrupt state validation processes of high-privilege host runtimes.
Depending on how the hosting application integrates streams, this behavior has different concrete outcomes. If the application processes sensitive transactions, payload body validations, or authentication messages using streams, the integrity check bypass can allow an attacker to replay inputs, process malformed or previously closed data channels, or induce logic errors in the host's middleware handlers.
Due to the structural difficulty in defending V8-level proxy bridges from recurring symbol and prototype leaks, the overall integrity of the vm2 sandbox boundary is compromised, making it unsuitable for processing fully untrusted code.
The primary remediation strategy is upgrading the library to version 3.11.7 or higher. This release integrates the namespace-based symbol checks that block all registered symbols prefixed with nodejs. from crossing the proxy bridge.
However, because the vm2 library is deprecated and the maintainers have officially archived the project, the recommended long-term remediation strategy is to migrate away from vm2 entirely. Applications executing untrusted scripts must transition to process-isolated architectures, such as executing scripts in separate short-lived subprocesses confined by system-level permissions (e.g., Docker, seccomp, gVisor), or utilizing V8 isolates through libraries designed with out-of-process boundaries like isolated-vm.
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
vm2 patriksimek | >= 3.11.4, <= 3.11.6 | 3.11.7 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-669 |
| Attack Vector | Adjacent/Remote dependent on application exposure |
| CVSS v4.0 Score | 8.9 |
| EPSS Score | 0.00461 (Percentile: 37.62%) |
| Impact | High Integrity Impact / Sandbox Escape |
| Exploit Status | PoC / Non-weaponized |
| KEV Status | Not Listed |
The product does not properly prevent resources from crossing an architectural boundary, such as a sandbox.
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.
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.
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.
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.
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.
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.