Critical Flaw in isolated-vm Can Lead to Sandbox Escape, RCE Threat
Developers for years have been using vm2, an open-source Node.js library, to run untrusted JavaScript inside a secure and isolated sandbox environment. It uses Node.js’s built-in modules and JavaScript Proxies and lets developers whitelist particular built-in Node modules or limit what the script can access. During that time, vm2 has been the default for safely […]
A critical flaw in the isolated-vm sandbox, an isolated environment for running untrusted JavaScript, has been discovered by Endor Labs researchers. While isolated-vm uses stronger techniques than vm2, it is still vulnerable to a type confusion bug that allows sandbox code to corrupt memory in the host process. This bug, tracked as GHSA-864f-rcv7-6rh4, enables attackers to hijack the host's control flow and potentially execute remote code outside the sandbox.
The issue lies in the C++ glue code responsible for serializing values across the sandbox boundary, written in a memory-unsafe language. The flaw is not related to the V8 Isolate, but rather the implementation in the sandbox. To mitigate the risk, developers should update to isolated-vm 7.0.1 or 6.2.0, as these versions contain patches for the vulnerability.
It is essential for developers to review and strengthen their sandboxes, especially those handling untrusted code, as isolated-vm is widely used in popular production systems like n8n, Mastra, Sim.ai, and Activepieces.
Written by urgent.news from DevOps.com's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.