A significant security vulnerability has been identified in the isolated-vm library, widely utilized for sandboxing JavaScript in Node.js environments. This flaw allows potentially untrusted JavaScript to escape its V8 sandbox, posing a risk of hijacking the execution process on the host system.
Details of the Vulnerability
Identified as GHSA-864f-rcv7-6rh4 and pending an official CVE, the issue affects versions of isolated-vm prior to 7.0.1 and 6.2.0. Remedial updates were released by the maintainers on August 8, 2026.
The flaw resides within the ExternalCopy feature, which facilitates data transfer between separate V8 Isolates. Each isolate maintains its own heap and objects, preventing unauthorized access unless explicitly allowed through mechanisms like ivm.Reference.
Investigations by Endorlabs revealed that the flaw was not in the V8 isolation itself, but in the native C++ code that manages data transfers across the isolation boundary.
Mechanics of the Exploit
The vulnerability involves the transferList option used by ExternalCopy. This option is meant to enhance performance by transferring ArrayBuffer memory instead of duplicating it, thus optimizing the handling of large buffers.
During the process, the transfer list is examined twice. The first pass confirms that every element is an ArrayBuffer. However, the second pass, which handles the transfer, lacks this revalidation, opening up a gap for exploitation.
An attacker can leverage this gap by using a JavaScript getter. Initially, the getter presents a valid ArrayBuffer, passing the validation. On a subsequent call, it can return a different data type, leading to unchecked conversions in native code and creating a type-confusion vulnerability.
Implications and Recommendations
Endorlabs warns that this flaw could escalate from denial-of-service attacks to full control-flow hijacking, potentially executing arbitrary code outside the intended sandbox.
The vulnerability poses a significant threat to multi-tenant applications, AI platforms, and services executing user-provided JavaScript, where isolated-vm is used to separate execution environments.
To mitigate this issue, it is crucial for organizations to update to isolated-vm versions 7.0.1 or 6.2.0 promptly. Security teams should also limit the functionalities available to sandboxed code and conduct thorough audits of native binding layers to prevent similar issues in the future.
The corrective measure involves halting JavaScript execution during the ExternalCopy operation, thus preventing any manipulative actions like getters or proxies from interfering between validation and transfer stages.
