Home / Companies / Endor Labs / Blog / Post Details
Content Deep Dive

Heaps of Built-in's: How JavaScript Sandboxes work

Blog post from Endor Labs

Post Details
Company
Date Published
Author
Robert Haynes
Word Count
1,114
Company Posts That Month
22
Language
English
Hacker News Points
-
Post removed?
No
Summary

JavaScript sandboxing is increasingly important for AI agents, automation platforms, and low-code tools that execute untrusted code, but JavaScript-level sandboxing approaches such as vm2 have repeatedly failed because guest and host code share a heap, mutable built-ins, prototypes, and potentially the Function constructor. V8 Isolates provide stronger separation by giving each environment independent heaps, garbage collectors, built-ins, and function constructors, preventing guest code from traversing host object graphs or modifying host prototypes. Node.js applications commonly use isolated-vm to create these Isolates, transferring data through copied values and intentionally exposed Reference capabilities rather than shared objects. However, an August 2026 critical vulnerability in isolated-vm’s C++ copying layer showed that secure engine-level isolation can still be undermined by unsafe native glue code, allowing attacker-controlled values to redirect host execution without breaking V8’s Isolate boundary. The issue was fixed in isolated-vm versions 7.0.1 and 6.2.0, underscoring the need to audit exposed capabilities, native bindings, marshaling code, and dependency versions alongside the sandboxing primitive itself.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
AI Agents 1 5,780 1,243 245 -15%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.