
Docker fixes sandbox flaw letting AI agent kit updates steal API keys
Docker patched a high-severity sandbox flaw that let a previously approved AI agent kit update exfiltrate host-stored API keys to attacker-controlled destinations. The bug shows how consent for automated agent packages can silently become permission for future network changes, exposing developer accounts and repositories.
Docker Sandboxes run AI coding agents in isolated virtual machines and store raw API keys on the host. Endor Labs researcher Peyton Kennedy found that a third-party agent kit approved once could later send a real Anthropic, OpenAI or GitHub key to an attacker-controlled server after a kit update. The flaw, tracked as CVE-2026-136998, affected versions before 0.55.0 on macOS, Windows and Linux. Docker released the fix in version 0.55.0.
The consent system added in 0.43.0 records a binding when a developer approves a kit's credential request, including the service and domains. Kennedy found that binding was never read back. At request time, the proxy checked only whether a binding existed for the service name, then sent the real key to whatever domains the current kit named. In a local test, a kit approved for api.anthropic.com was changed to a test server. The next sandbox creation showed no prompt and delivered a dummy key in cleartext.
The issue is a collapsed trust boundary in automated development pipelines: approval for a package was treated as permanent permission for that package's changing network destinations. The researcher scored the flaw 8.2 High under CVSS 3.1 after correcting the attack vector to local, because the malicious kit is fetched by the developer. Under CVSS 4.0 his score was 6.9 and Docker's 5.6, both Medium. No attacks using the flaw have been reported, and cloud sandboxes use a separate secret store, with the authorization logic not established as shared.
The damage follows the key. Secrets stored with sbx secret set are global by default, so a redirected key is used by every sandbox on the machine. A stolen GitHub token can expose whatever scopes it allows, including write access to repositories. Thirteen built-in integrations share the key-injection path, including Anthropic, OpenAI, GitHub and Google. Upgrading to 0.55.0 removes the flaw by enforcing approved destinations for API keys and OAuth separately, and treating missing destinations as no binding.
Developers using Docker Sandboxes before 0.55.0 could have host API keys redirected by updated agent kits, exposing accounts, repositories and provider credits through globally shared secrets.
Sources (1)
- [1]Docker Sandboxes Flaw Lets Malicious AI Agent Kit Updates Steal Developers' API Keys(https://thehackernews.com/2026/12/docker-sandboxes-flaw-lets-malicious-ai.html)