CVE-2026-22686 Sandbox Escape via Host Error Prototype Chain in enclave-vm

Critical 10.0 Published Updated

Attackers can escape the JavaScript sandbox to execute arbitrary code on the host Node.js runtime by exploiting the host Error prototype chain.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-22686?

CVE-2026-22686 is a critical code injection vulnerability in agentfront enclave, published on 13 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Enclave is a secure JavaScript sandbox designed for safe AI agent code execution. Prior to 2.7.0, there is a critical sandbox escape vulnerability in enclave-vm that allows untrusted, sandboxed JavaScript code 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. An attacker can intentionally trigger a host error, then climb the prototype chain. Using the host Function constructor, arbitrary JavaScript can be compiled and executed in the host context, fully bypassing the sandbox and granting access to sensitive resources such as process.env, filesystem, and network. This breaks enclave-vm’s core security guarantee of isolating untrusted code. This vulnerability is fixed in 2.7.0.

Weakness: CWE-94, CWE-693

Which versions are affected by CVE-2026-22686?

2 open source packages ship an affected version, including enclave-vm. It affects 1 product.

PackageAffectedFixed in
enclave-vm npmAll versions2.7.0
enclave-vm npmAll versions2.7.0

Products include Agentfront Enclave.

How do I fix CVE-2026-22686?

Upgrade enclave-vm to 2.7.0 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-22686 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-22686 exists.

Public exploit code: 3 proofs of concept on GitHub.

Sources

Also known as GHSA-7qm7-455j-5p63.

Is CVE-2026-22686 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free