Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. enclave-vm
  4. ›
  5. CVE-2026-22686

CVE-2026-22686: enclave-vm Vulnerable to Sandbox Escape via Host Error Prototype Chain

January 14, 2026 (updated January 15, 2026)

A critical sandbox escape vulnerability exists in enclave-vm (affected: < 2.6.0, patched: 2.7.0) that can allow untrusted, sandboxed JavaScript to execute arbitrary code in the host Node.js runtime.

When a tool invocation fails, enclave-vm exposes a host-side Error object to sandboxed code. This Error object retains its host realm prototype chain, which can be traversed to reach the host Function constructor:

Error instance → Error.prototype → Error constructor → Function constructor

With access to the host Function constructor, an attacker can compile and execute arbitrary JavaScript in the host context — bypassing the sandbox boundary and potentially gaining access to sensitive resources such as process.env, filesystem, and network.

This breaks enclave-vm’s core security guarantee of isolating untrusted code.


References

  • github.com/advisories/GHSA-7qm7-455j-5p63
  • github.com/agentfront/enclave
  • github.com/agentfront/enclave/commit/ed8bc438b2cd6e6f0b5f2de321e5be6f0169b5a1
  • github.com/agentfront/enclave/security/advisories/GHSA-7qm7-455j-5p63
  • nvd.nist.gov/vuln/detail/CVE-2026-22686

Code Behaviors & Features

Detect and mitigate CVE-2026-22686 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.7.0

Fixed versions

  • 2.7.0

Solution

Upgrade to version 2.7.0 or above.

Impact 10 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

npm/enclave-vm/CVE-2026-22686.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 04 Feb 2026 00:37:11 +0000.