CVE-2026-92936 in vm2info

Summary

by MITRE • 09/17/2026

vm2 versions 3.11.0 through 3.11.6 leak absolute host filesystem paths to sandboxed code through error stack formatting. Attacker-supplied code can force the host-realm source transformer to throw a SyntaxError (for example by calling eval with malformed source) and then read the error's .stack property; the bridge forwards the .stack read to the host-realm formatter, bypassing the sandbox-side host-path redaction introduced for GHSA-v27g-jcqj-v8rw. The returned stack string discloses absolute paths from vm2, Node.js internals, and the embedding application's own source tree, along with host function names. Default new VM() and new NodeVM() configurations are affected without any special options, and the issue persists when string eval is disabled because the host-side transformer throws before eval is handled. The impact is information disclosure only; no code execution results. Fixed in vm2 3.11.7.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 09/17/2026

The vulnerability identified in versions of the vm2 library ranging from 3.11.0 through 3.11.6 constitutes a significant information disclosure flaw rooted in improper handling of error stack traces during sandboxed execution. This issue allows attacker-supplied code executed within the virtual machine environment to access absolute host filesystem paths that are normally restricted by security boundaries. The core technical mechanism involves forcing the host-realm source transformer to throw a SyntaxError, which can be achieved simply by invoking eval with malformed source code or triggering other syntax-related exceptions. When such an error occurs, the JavaScript engine generates an error object containing a stack trace property. In standard secure configurations, this property should be sanitized before being exposed to the sandboxed context to prevent leakage of internal host details.

The specific failure mode arises from how vm2 handles the reading and forwarding of these stack traces across the boundary between the sandbox realm and the host realm. When code within the VM attempts to read the .stack property of an error object, the bridge layer forwards this request to a formatter operating in the host-realm context. This action effectively bypasses the redaction logic that was previously implemented to strip out sensitive host paths from stack traces, as referenced by security advisory GHSA-v27g-jcqj-v8rw. Consequently, instead of receiving sanitized output or an empty string, the sandboxed code receives a detailed stack trace containing absolute file system paths associated with vm2 internals, Node.js core modules, and potentially the source tree of the embedding application itself. This also includes host function names which can aid in further reconnaissance by an attacker attempting to map the underlying infrastructure.

The operational impact of this vulnerability is strictly limited to information disclosure, as it does not provide a direct path for arbitrary code execution or privilege escalation within the host environment. However, the exposure of absolute file paths and internal module structures provides valuable intelligence that can facilitate more sophisticated attacks against the hosting application. Knowledge of the exact directory structure allows attackers to identify potential targets such as configuration files, private keys, or other sensitive data located in predictable locations relative to the disclosed paths. Furthermore, understanding the specific versions of Node.js internals and vm2 being used helps an attacker tailor exploits for known vulnerabilities within those specific components. The vulnerability affects default configurations of both new VM() and new NodeVM(), meaning that applications relying on standard sandboxing practices without additional custom security hardening are immediately susceptible to this leakage.

This flaw persists even when string eval is disabled, indicating that the issue is not solely dependent on dynamic code execution capabilities but rather on fundamental error handling mechanisms within the bridge layer. The host-side transformer throws errors before eval is fully processed in certain scenarios, yet these errors still propagate their stack traces back through the vulnerable path to the sandboxed context. This demonstrates a systemic oversight in how exception states are serialized and transmitted across security boundaries in vm2 versions prior to 3.11.7. Mitigation requires upgrading to version 3.11.7 or later, where this specific vector for information leakage has been addressed by ensuring that stack traces do not expose host-specific absolute paths when accessed from within a sandboxed environment.

From a classification perspective, this vulnerability aligns with CWE-200: Information Exposure and CWE-538: Insertion of Sensitive Information into Log File or Other Product if the error logs are also affected by similar patterns in broader logging mechanisms. In terms of adversary behavior, it maps to ATT&CK technique T1083: File and Directory Discovery, as an attacker would use this information leak to enumerate the file system structure for subsequent exploitation steps. Security practitioners should audit their dependency trees for any usage of vm2 versions within the affected range and prioritize updates to mitigate the risk of sensitive infrastructure details being exposed through unhandled exception states in sandboxed code execution contexts.

Responsible

VulnCheck

Reservation

09/17/2026

Disclosure

09/17/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!