V8 isolates
language-runtimeruntime-sandboxopen sourceIndependent instances of the V8 JavaScript engine, each with its own heap, used as a sandbox that starts in milliseconds and never issues a .
A V8 isolate is a self-contained instance of the JavaScript engine: its own heap, its own garbage collector, its own global object, unable to reach another isolate's memory by design. Because JavaScript running in an isolate cannot issue a , allocation, compilation, and execution all happen inside the host process, the boundary is not made of kernel features at all. There is no interface to filter, so seccomp and Landlock have nothing to act on; what confines the code is the engine's memory safety plus the fact that it can only call APIs the embedder chose to expose. That makes isolates radically cheaper than any OS-level sandbox, milliseconds and megabytes rather than hundreds of each, and it makes them a fundamentally different kind of wall: strong against a program that plays by the language's rules, and reliant on the engine itself against one that does not. Many tenants can share not just a kernel but a single process, so an engine escape is a tenancy escape unless something else contains it.
Strengths
- Starts in milliseconds with a few megabytes of overhead, orders of magnitude cheaper than a container or VM
- Guest code issues no syscalls at all, so the host kernel is not directly reachable from the sandboxed program
- Deny-by-default capability model: the code can only call what the embedder hands it
- Mature and very heavily attacked, which means bugs are found, and found fast
Limitations
- The boundary is a JIT compiler for a dynamic language, a far larger and more complex attack surface than a hypervisor's
- Shared kernel and frequently a shared process, so an engine escape lands you next to other tenants with no OS boundary in between
- Only isolates what the runtime mediates: native modules, Wasm imports, or a permissive host API reintroduce everything it removed
- Depends on an aggressive patch pipeline to stay standing, because V8 bugs arrive steadily
- JavaScript and WebAssembly only, this is not a way to sandbox arbitrary binaries