CVE-2026-22686

The Trojan Horse of Errors: Escaping Enclave-VM via Host Prototype Chains

Alon Barad
Alon Barad
Software Engineer

Jan 14, 2026·7 min read·5 visits

Executive Summary (TL;DR)

If an AI agent or untrusted script running inside `enclave-vm` triggers an error in a host tool, the sandbox previously handed it a raw Host Error object. Attackers can climb this object's prototype chain (`error.__proto__.constructor.constructor`) to get a reference to the Host's `Function` constructor, enabling full Remote Code Execution (RCE) and total system compromise. Fixed in version 2.7.0.

A critical sandbox escape vulnerability in `enclave-vm` allowing malicious code to break out of the JavaScript sandbox by leveraging host-side Error objects. By traversing the prototype chain of an error returned from a failed tool call, attackers can access the host's `Function` constructor and execute arbitrary code on the underlying server.

Fix Analysis (1)

Technical Appendix

CVSS Score
10.0/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
EPSS Probability
0.10%
Top 71% most exploited

Affected Systems

enclave-vm < 2.7.0Node.js applications using enclave-vm for AI sandboxingAgentic AI frameworks relying on enclave-vm for tool execution

Affected Versions Detail

Product
Affected Versions
Fixed Version
enclave-vm
AgentFront
< 2.7.02.7.0
AttributeDetail
CWECWE-693 (Protection Mechanism Failure)
CVSS v3.110.0 (Critical)
VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Attack VectorPrototype Chain Traversal via Host Object Leak
Exploit StatusPoC Available (Vector 35)
EPSS Score0.00102
CWE-693
Protection Mechanism Failure

Protection Mechanism Failure

Vulnerability Timeline

Patch committed to main branch
2026-01-09
GHSA Advisory Published
2026-01-13
CVE Published
2026-01-14

Subscribe to updates

Get the latest CVE analysis reports delivered to your inbox.