Docker flaw lets Anthropic, OpenAI, GitHub keys slip past sandboxes

Docker has patched a high-severity vulnerability in Docker Sandboxes that could allow malicious third-party AI agent kits to steal developers’ API credentials through seemingly routine software updates.

Tracked as CVE-2026-136998, the vulnerability exploits a flaw in how Docker Sandboxes remembers and enforces user approval for credential access. An attacker could publish a legitimate-looking agent kit, obtain a developer’s approval to access a particular service, and subsequently modify the kit to redirect the credentials to an attacker-controlled server.

The attack requires neither access to the developer’s machine nor a compromise of the sandbox itself. Instead, it exploits a gap between what a developer initially approves and what Docker subsequently authorizes.

Discovered by Peyton Kennedy of Endor Labs, the vulnerability carries a high-severity CVSS score of 8.2 and affects Docker Sandboxes versions introduced with v0.43.0. Docker addressed the issue in version 0.55.0, released November 30, 2026.

The exposed credentials could include API keys for Anthropic, OpenAI and other AI providers, alongside GitHub tokens that could potentially grant attackers write access to developers’ repositories.

Persistent credential bypass through a one-time approval

Docker Sandboxes are designed to keep raw API credentials outside the microVM in which an AI coding agent operates. Developers store their credentials on the host using the “sbx secret set” command, while a host-side proxy injects the actual keys into outgoing requests destined for approved domains. The sandbox itself only handles placeholder credentials.

With the introduction of version 0.43.0, Docker added a consent mechanism requiring developers to approve the credentials and destinations requested by third-party agent kits.

Kennedy found that the approval mechanism records the authorization against a service name, instead of the specific agent kit or its version. Although Docker stores the domains approved by the developer in credentials.yaml, those domain restrictions are not subsequently enforced when the proxy injects credentials.

An attacker could exploit this by publishing an agent kit that initially requests access to a legitimate service domain, such as api.anthropic.com. Once a developer approves the request, the attacker can update the same kit to replace the approved destination with a server under their control.

When the developer subsequently runs the updated kit, Docker recognizes the existing approval and proceeds without displaying another consent prompt or warning. The proxy then injects the real API key into requests sent to the attacker’s destination.

Credential theft leaves little evidence in policy logs

The implications extend beyond unauthorized API consumption. Kennedy demonstrated that the vulnerability could expose credentials in cleartext, using a dummy Anthropic API key and a locally hosted canary server to reproduce the attack.

The reproduction confirmed that the sandbox sent a placeholder credential while the host-side proxy substituted the actual key before forwarding the request. The canary server consequently received the credential, despite the developer having approved a different destination.

The vulnerability also creates an accountability problem. Docker’s sbx policy log records the connection to the destination as an allowed request but does not indicate that a credential was injected. Consequently, developers reviewing their logs may see an ordinary permitted network connection without any indication that their credentials were exposed.

Kennedy confirmed the issue using Anthropic’s credential injection path. Although all 13 built-in services share the same injection mechanism, the other 12 were not independently demonstrated. Docker Sandboxes v0.55.0 addresses the vulnerability.

Until systems are upgraded, Endor Labs recommends reviewing existing third-party credential approvals, pinning agent kits to fixed commits instead of mutable references, restricting credentials to individual sandboxes, and rotating keys if a previously approved kit may have changed.