Critical Isolated-vm Vulnerability Exposes Host Systems to Remote Code Execution Attacks
A severe security flaw in a popular Node.js library has left developers scrambling to patch their applications and protect against potential remote code execution (RCE) attacks. The isolated-vm library, used by many organizations to execute untrusted JavaScript code within a sandboxed environment, contains a critical type confusion bug that can be exploited by malicious actors.
The vulnerability, which has yet to receive a CVE identifier, resides in the ExternalCopy function of the isolated-vm library. This function is responsible for copying data between isolated environments, and its design allows an attacker to manipulate the transferList array, which is used to reconstruct the data on the receiving end. By crafting a malicious transferList, an attacker can create a situation where the reconstructor iterates over the array twice, trusting the first walk and allowing them to dereference an attacker-controlled pointer.
The issue lies in the fact that iterating over a JavaScript array with getters can return different values each time it is accessed. An attacker can exploit this weakness by abusing the TOCTOU (time-of-check/time-of-use) vulnerability to manipulate the pointer and gain control of the host process. This could potentially lead to RCE on the host, allowing an attacker to execute arbitrary code on the system.
The isolated-vm library is widely used in various applications, including those that run untrusted JavaScript code within a sandboxed environment. According to EndorLabs, which discovered the vulnerability, any embedder that runs untrusted code in an isolate and shares even one Reference into it is affected. This includes host code that passes a caller-influenced array as transferList.
Patches for the vulnerability have been released in isolated-vm versions 6.2.0 and 7.0.1, which prevent user JavaScript from running during the copy operation. However, developers must ensure they are using one of these patched versions to avoid exposing their applications to potential RCE attacks.
The isolated-vm library is a complex piece of software that relies on C++ bindings to serialize values across the boundary between isolated environments. The vulnerability was found in the native glue code, which is written in a memory-unsafe language and manipulates raw V8 handles and backing-store pointers. EndorLabs notes that a single unchecked cast on a re-read value was enough to turn a correct isolation primitive into a full escape.
Developers who use the isolated-vm library must take immediate action to patch their applications and protect against potential RCE attacks. This includes updating to the latest patched versions of the library and ensuring that all shared References are properly validated before passing them into the sandboxed environment. By taking these steps, developers can minimize the risk of their applications being compromised by attackers exploiting this critical vulnerability.
Source: SecurityWeek — 2026-08-21