CVE-2026-92947 in vm2
Summary
by MITRE • 09/17/2026
vm2 before 3.11.7 exposes Node's shared Buffer pool to sandboxed code, allowing disclosure of host memory used by Buffer.from, Buffer.concat, and related allocations. Sandboxed code can read and write to host-realm buffers by acquiring ArrayBuffers from small allocations, leading to sensitive data exposure and potential denial-of-service.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 09/17/2026
The vulnerability identified in versions of vm2 prior to 3.11.7 represents a critical failure in the isolation mechanisms designed to sandbox untrusted JavaScript code within Node.js environments. The core technical flaw stems from an improper handling of memory allocation strategies, specifically regarding how the underlying V8 engine manages shared buffer pools for small object allocations. In standard Node.js operations, functions such as Buffer.from and Buffer.concat often utilize a pre-allocated pool of memory to optimize performance by avoiding frequent calls to system-level memory allocators like malloc or new ArrayBuffer. This optimization is generally safe within trusted code but becomes dangerous when exposed to sandboxed contexts that are supposed to be isolated from the host environment's state.
When vm2 fails to properly isolate these allocations, it inadvertently exposes Node.js internal structures and shared buffer pools directly to the sandboxed execution context. By making small memory allocations inside the sandbox, an attacker can trigger the reuse of existing buffers in the shared pool rather than receiving fresh, isolated memory regions. This behavior allows malicious code running within the restricted environment to acquire references to ArrayBuffers that are actually part of the host realm's memory space. Consequently, the fundamental boundary between the trusted host application and the untrusted sandboxed code is effectively dissolved at the memory level, creating a direct pathway for unauthorized data access.
The operational impact of this vulnerability is severe, primarily manifesting as sensitive information disclosure through host memory leakage. Because the attacker can read from these shared buffers, they may extract credentials, session tokens, private keys, or other confidential data that resides in Node.js heap memory at the time of allocation. Furthermore, the ability to write to these host-realm buffers introduces a significant risk of denial-of-service and potential remote code execution scenarios. By overwriting critical internal structures or corrupting memory states outside the sandbox's intended boundaries, an attacker can destabilize the application, cause crashes, or manipulate control flow in ways that could lead further exploitation beyond simple data theft.
This flaw aligns with CWE-200, which classifies information exposure vulnerabilities where sensitive system information is accessible to unauthorized actors without explicit intent. Additionally, from a tactical perspective related to the MITRE ATT&CK framework, this vulnerability facilitates Initial Access and Credential Access techniques by allowing attackers to harvest secrets directly from memory rather than relying on traditional file-based exfiltration methods that might be more easily monitored or restricted. The ability to write to host memory also touches upon Defense Bypass concepts, as it undermines the integrity of the sandboxing mechanism intended to contain malicious payloads.
Mitigation for this vulnerability requires an immediate upgrade to vm2 version 3.11.7 or later, where these isolation flaws have been addressed through stricter enforcement of buffer ownership and allocation boundaries. Organizations relying on dynamic code execution features must ensure that their dependency management systems are configured to automatically detect and apply such security patches. In environments where upgrading is not immediately feasible, implementing strict allowlists for required modules and disabling unnecessary eval-like functionalities can reduce the attack surface. Additionally, running sandboxed processes with minimal privileges and utilizing operating-level containerization or process isolation can provide a secondary layer of defense against memory-based exploitation attempts.