Docker Sandboxes — Flaw in AI Agent Kits Allows Developers’ API Key Theft (CVE-2026-136998)
Publication date: December 01, 2026
Category: Vulnerability / Artificial Intelligence
Introduction
A critical security flaw in Docker Sandboxes, a solution engineered to run AI coding agents within isolated virtual machines, allowed compromised or malicious third-party agent kits to siphon developers’ API keys and credentials. Researchers discovered that following an initial developer approval, a subsequent update to the agent kit could silently redirect keys for services like Anthropic, OpenAI, or GitHub to an attacker-controlled server without prompting the user again. Tracked as CVE-2026-136998, the vulnerability was officially patched by Docker in version 0.55.0.
What is CVE-2026-136998? (General Analysis)
The core premise of Docker Sandboxes is that raw credentials never enter the isolated virtual machine. The standard operational flow requires a developer to store secrets on the host via sbx secret set. The agent inside the virtual container sends requests containing a placeholder header, while a host-level proxy intercepts the traffic to inject the real API key on its way out.
The vulnerability stems from flawed handling of consent bindings. Introduced in version 0.43.0, the consent mechanism recorded approved service destinations. However, technical analysis revealed that this recorded list was never actually validated during request handling. The proxy merely checked if a binding existed for the service name, subsequently dispatching the real key to whatever domains the current kit version specified, completely disregarding the user-approved destination whitelist.
Official NVD verified data:
- CVE ID: CVE-2026-136998
- Official CVSS Score & Vector (v4.0): 5.6 (MEDIUM) —
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - Official CWE Classification: CWE-863 (Incorrect Authorization)
- CISA KEV Catalog: Not reported
How Does It Work? (Technical Analysis)
The exploitation mechanism relies on the blind persistence of permissions granted to mutable software artifacts:
- Initial Infection Flow / Exploit Entry: The developer fetches a legitimate third-party agent kit from a registry, Git reference, or local folder, granting a one-time approval to communicate with specific trusted domains (e.g.,
api.anthropic.com). - Kit Modification and Substitution: The attacker modifies or updates the kit at the same reference point, changing the injection destination to a test server under their control. Because the consent system fails to tie approvals to the cryptographic digest or exact content of the artifact, the platform assumes the service is pre-approved.
- Credential Exfiltration: Upon creating a new sandbox instance, the host proxy injects the real provider key and transmits it in cleartext to the attacker’s server. Policy logs incorrectly record the connection as allowed without generating any warnings regarding secret disclosure.
Affected Systems / Environments
The flaw impacts all supported operating system platforms (macOS, Windows, and Linux) running vulnerable versions:
- Affected Software: Docker Sandboxes from version 0.43.0 (released September 15, 2026) through version 0.54.x.
- Fixed Version: Docker Sandboxes 0.55.0 and later.
- Affected Integrations: Thirteen built-in integrations sharing the key-injection pathway, including Anthropic, OpenAI, GitHub, and Google.
Mitigation and Detection
Remediation
Defenders and administrators must immediately adopt the following countermeasures:
- Upgrade Docker Sandboxes to version 0.55.0 or higher, which enforces approved destination checks independently for API keys and OAuth, treating bindings with missing destinations as invalid.
- Review the local credentials approval file (
~/.config/sbx/credentials.yamlon Unix-like systems or%APPDATA%\sbx\credentials.yamlon Windows) and strip any bindings granted to untrusted third-party kits. - Rotate all provider keys and tokens associated with third-party kits that underwent subsequent updates while vulnerable.
- Isolate secret storage per sandbox using the
--sandboxflag rather than relying on global storage.
Detection
Defensive teams should implement proactive monitoring routines:
- Audit kit network configuration permissions (
permissions.network.allow) during every execution ofsbx create. - Monitor host outgoing traffic for unexpected data flows originating from development environments toward unrecognized endpoints.
“A prompt is only as strong as what its answer is bound to. If the approval is not tied to the artifact that was inspected, the next update inherits it.”
Wrapping Up
The discovery of CVE-2026-136998 highlights a critical security pitfall in AI-assisted developer tooling: failing to bind user consent mechanisms directly to immutable software artifacts. By bypassing destination verification during kit updates, attackers could execute silent credential exfiltration across local systems. Upgrading to version 0.55.0 resolves this vulnerability by enforcing rigorous destination validation, serving as a reminder that automated agent workflows require stringent supply chain controls.
References
- Docker. (2026). Docker Sandboxes Release Notes (v0.55.0). https://docs.docker.com/ai/sandboxes/release-notes
- Docker. (2026). Credentials Configuration Documentation. https://docs.docker.com/ai/sandboxes/configuration/credentials/
- Endor Labs. (2026). Technical Analysis of CVE-2026-136998 in Docker Sandboxes. https://www.endorlabs.com/learn/cve-2026-136998-docker-sandboxes
- Mitre Corporation. (2026). CVE-2026-136998 Record. https://www.cve.org/CVERecord?id=CVE-2026-136998
- Khandelwal, S. (2026). Docker Sandboxes Flaw Lets Malicious AI Agent Kit Updates Steal Developers’ API Keys. The Hacker News. https://thehackernews.com/2026/12/docker-sandboxes-flaw-lets-malicious-ai.html