The Trojan Horse of Errors: Escaping Enclave-VM via Host Prototype Chains
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.
Official Patches
Fix Analysis (1)
Technical Appendix
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:HAffected Systems
Affected Versions Detail
| Product | Affected Versions | Fixed Version |
|---|---|---|
enclave-vm AgentFront | < 2.7.0 | 2.7.0 |
| Attribute | Detail |
|---|---|
| CWE | CWE-693 (Protection Mechanism Failure) |
| CVSS v3.1 | 10.0 (Critical) |
| Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| Attack Vector | Prototype Chain Traversal via Host Object Leak |
| Exploit Status | PoC Available (Vector 35) |
| EPSS Score | 0.00102 |
MITRE ATT&CK Mapping
Protection Mechanism Failure
Known Exploits & Detection
Vulnerability Timeline
Subscribe to updates
Get the latest CVE analysis reports delivered to your inbox.