JavaScript Sandboxing Research

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story. The source provided limited text, so this summary is brief.

Why it matters

Teams that must run untrusted JavaScript now have a side-by-side map of sandboxing options, helping them avoid dangerously obsolete choices like vm2.

Read this as

Simon Willison describes using Claude Code to research how to safely run untrusted JavaScript inside a Node.js application. The resulting comparison covers Node's built-in options (worker_threads, node:vm, its Permission Model), community packages like isolated-vm and vm2, and alternative engines such as quickjs-emscripten, QuickJS-NG, ShadowRealm and Deno Workers. No benchmark results, pricing or concrete recommendation is included in the excerpt.

Running code from untrusted users is a recurring security decision for platform teams, and Willison's post surveys the realistic choices as of March 2026: Node's worker_threads, node:vm and Permission Model versus third-party packages (isolated-vm, vm2) and standalone engines (quickjs-emscripten, QuickJS-NG, Deno Workers). The article omits performance figures, costs and a verdict, so it functions as a starting checklist rather than a decision.

The research compares JavaScript sandboxing mechanisms on the server side: Node.js worker_threads, the node:vm module, and the Node Permission Model, alongside npm packages isolated-vm and vm2, the latter long known as bypassed and deprecated, and engine-level options including quickjs-emcripten, QuickJS-NG, the ShadowRealm proposal and Deno Workers. The comparison was generated by Claude Code from an initial question about worker threads. No benchmarks or exploit tests are reported.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Node.js isolated-vm vm2 quickjs-emscripten QuickJS-NG Deno Workers ShadowRealm

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading