enclave-vm Vulnerable to Sandbox Escape via Host Error Prototype Chain
Critical severity
GitHub Reviewed
Published
Jan 13, 2026
in
agentfront/enclave
•
Updated Jan 15, 2026
Description
Published by the National Vulnerability Database
Jan 14, 2026
Published to the GitHub Advisory Database
Jan 14, 2026
Reviewed
Jan 14, 2026
Last updated
Jan 15, 2026
A critical sandbox escape vulnerability exists in enclave-vm (affected: < 2.6.0, patched: 2.7.0) that can allow untrusted, sandboxed JavaScript to execute arbitrary code in the host Node.js runtime.
When a tool invocation fails, enclave-vm exposes a host-side Error object to sandboxed code. This Error object retains its host realm prototype chain, which can be traversed to reach the host
Functionconstructor:Error instance → Error.prototype → Error constructor → Function constructorWith access to the host
Functionconstructor, an attacker can compile and execute arbitrary JavaScript in the host context — bypassing the sandbox boundary and potentially gaining access to sensitive resources such asprocess.env, filesystem, and network.This breaks enclave-vm’s core security guarantee of isolating untrusted code.
Ecosystem Impact (FrontMCP / CodeCall)
FrontMCP is a TypeScript-first framework for building MCP servers, and the CodeCall plugin enables models to orchestrate large toolsets by generating and executing JavaScript plans.
Enclave is the defense-in-depth sandbox layer behind CodeCall (AST validation + runtime sandboxing). If you use FrontMCP CodeCall for agent tool execution, you should treat this as an urgent upgrade and ensure your runtime is on a patched enclave-vm version.
Live Playground (Safe Exploration & Testing)
To explore Enclave’s execution model (AgentScript + tool calls) and validate your integration behavior, use the live playground:
This is the quickest way to understand the sandbox / tool-call flow and confirm your environment is running a patched setup.
Timeline (Fast Fix)
enclave-vm@2.7.0(Jan 9, 2026)Proof of Concept
Click to expand PoC
Mitigation / Remediation
Immediate action:
Defense-in-depth guidance:
FunctionconstructorsReferences