Oct 2, 2026·5 min read·12 visits
A design flaw in the vm2 CLI tool permits sandboxed code to load local files in the host execution realm, resulting in a complete sandbox escape and unauthenticated arbitrary command execution.
CVE-2026-92950 (GHSA-jxxv-8r27-vm4p) is a critical sandbox escape vulnerability in the command-line interface of the vm2 library prior to version 3.11.7. The flaw allows untrusted scripts to bypass sandbox constraints and execute arbitrary system commands with the privileges of the host process by exploiting insecure default configurations of the module resolver.
The vm2 library is a widely deployed Node.js library used to execute untrusted code in a sandboxed, isolated execution environment. To ensure isolation, vm2 wraps JavaScript execution frames using proxy objects and custom resolvers to intercept sensitive API calls. This sandboxing is critical for applications that process untrusted user-supplied code, such as online code editors or automated execution systems.
Prior to version 3.11.7, the global command-line interface tool supplied with vm2 contains a significant security configuration flaw. When running a targeted script through the CLI execution path, the runner instantiates an instance of the NodeVM engine with permissive external module options. This module resolution configuration is vulnerable to a sandbox escape that grants complete shell access to the host environment.
This specific bug class maps to CWE-453 (Insecure Default Variable Initialization). By executing arbitrary commands with the privileges of the executing process, an attacker can fully compromise the underlying host operating system. The vulnerability presents an immediate path to local privilege escalation or container escape if the CLI tool runs within a containerized environment.
The root cause of CVE-2026-92950 lies in how the vm2 command-line utility instantiates the sandboxed NodeVM instance in lib/cli.js. The CLI tool sets the require.external flag to true to allow sandboxed modules to import external dependencies. However, it fails to define the require.root property and leaves require.context unconfigured, causing it to fall back to the default 'host' evaluation context.
Within the vm2 library, the class CustomResolver (implemented in lib/resolver-compat.js) manages permissions for imported file paths. The resolution logic evaluates paths using a helper function called isPathAllowed. When require.root is undefined, the internal rootPaths array is also initialized as undefined, causing the resolver to permit any absolute or relative path without restriction.
Simultaneously, the 'host' evaluation context dictates that permitted modules must be loaded using the host process's native require() function rather than being evaluated within the sandbox context. Under these specific conditions, the resolver intercepts module queries and safely resolves the absolute path of the target script, but then hands the path over to Node's native module loader. Because native execution happens entirely in the host realm, the sandbox execution boundary is bypassed.
A review of the vulnerable implementation in lib/cli.js demonstrates the omission of restricting properties during the VM setup. The initialization configures external: true without constraining the root path or context:
// Vulnerable configuration in lib/cli.js (Pre-3.11.7)
NodeVM.file(path, {
verbose: true,
require: {
external: true
}
});In the patch released in version 3.11.7, the developers explicitly declared the root property as the parent directory of the script and set the execution context to 'sandbox' to block native module execution. The fix constrains imports and compiles them inside the safe sandbox wrapper:
// Patched configuration in lib/cli.js (v3.11.7)
NodeVM.file(path, {
verbose: true,
require: {
external: true,
// Explicitly set the root boundary to the target directory
root: pa.dirname(path),
// Enforce script execution inside the sandbox realm
context: 'sandbox'
}
});Furthermore, defense-in-depth measures were introduced in the resolution module to prevent nested escape routes. The update introduces the isVm2SelfRequire helper to block sandboxed scripts from loading vm2 itself. Without this block, an attacker could load the library from disk and generate unrestricted nested engines to execute commands on the host.
Exploitation of CVE-2026-92950 relies on a nested-import technique often referred to as a "self-require" primitive. An attacker crafts a malicious JavaScript file designed to run under dual execution phases. During the initial execution phase, the script runs within the sandboxed environment where calls to high-privilege built-in modules like fs or child_process fail.
When these calls fail and throw exceptions, the catch block intercepts the error and executes the escape payload. The script triggers a call to require(__filename), pointing directly back to its own file path on the host filesystem. Because the module root boundary is unrestricted and the resolution context is 'host', the custom resolver authorizes the native Node.js engine to load the file.
Upon the second execution phase, Node.js resolves and runs the script from the top using the host's native environment. This grants the script unrestricted access to the host's global context. The second execution successfully accesses the native fs and child_process modules, allowing arbitrary shell command execution with the privileges of the host process.
To completely address the vulnerability, administrators must upgrade the vm2 dependency to version 3.11.7 or higher. Organizations utilizing the CLI tool globally should execute updates to purge vulnerable versions from their global NPM configurations. It is important to note that the vm2 project has been officially deprecated by its maintainers due to structural design limitations within single-process Node.js sandbox systems.
For applications that instantiate NodeVM dynamically in code, developer teams must implement robust configuration policies. Never enable require.external without specifying a restricted require.root path. Enforcing context: 'sandbox' is also required to prevent the loading of modules inside the native host execution frame.
If immediate patching or replacement is not possible, security teams must deploy detection rules to identify exploit attempts. Monitor process creation events originating from Node.js applications that execute untrusted code. Deploying system-level controls like AppArmor or SELinux can block unauthorized system calls if an attacker successfully escapes the runtime sandbox.
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H| Product | Affected Versions | Fixed Version |
|---|---|---|
vm2 patriksimek | < 3.11.7 | 3.11.7 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-453 (Insecure Default Variable Initialization) |
| Attack Vector | Local |
| CVSS v4.0 Score | 9.3 (Critical) |
| EPSS Score | 0.00197 (8.53rd Percentile) |
| Exploit Status | Proof-of-Concept Publicly Available |
| KEV Status | Not Listed |
The vm2 CLI tool initializes the sandboxed context with an insecure configuration, omitting the root boundary and evaluation context rules, enabling module resolution inside the host realm.
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.