Docker Sandboxes Flaw Let a Single Approval Hand Over Developers' API Keys
Docker Sandboxes runs AI coding agents inside isolated virtual machines, with a promise that real API keys never enter the sandbox. Endor Labs researcher Peyton Kennedy found that a third-party agent kit could break that promise. After one approval from the developer, a later update to the kit could send their real Anthropic, OpenAI or GitHub key to a server the attacker controls, with no new prompt. The flaw is tracked as CVE-2026-136998. No attacks using it have been reported.
The design works like this: a developer stores a key on the host, the agent in the virtual machine sends requests with a placeholder, and a proxy on the host swaps in the real key. Since version 0.43.0, approving a kit's credential request records the service and the domains the developer agreed to. The problem was that this recorded domain list was never read back. The check only asked whether an approval existed for the service name, so the proxy sent the real key to whatever domains the current kit version named.
In his test, Kennedy approved a kit with api.anthropic.com as its only destination, then replaced it at the same reference with a version pointing at a test server. The next sandbox creation showed no prompt, and the proxy delivered a dummy key to that server in cleartext. The approval even survived the sandbox's deletion. The policy log showed the connection as allowed and said nothing about a key being injected. A malicious version could also add its own server to the network allowlist without a prompt.
Every version before 0.55.0 is affected on macOS, Windows and Linux. Thirteen built-in integrations share the key-injection path, though only Anthropic was tested. Kennedy rates it 8.2 High under CVSS 3.1, while the vendor's CVSS 4.0 score is 5.6 Medium. Docker's 0.55.0 release notes say credential injection now enforces approved destinations. Cloud sandboxes use a separate secret store, and it is not established whether they share the affected logic.
Why it matters
Teams that let developers install third-party agent kits assumed the approval prompt limited where a key could go, but the approval was never tied to the destinations or the kit's content, so any later update inherited it. The virtual machine boundary held; the failure was in what the consent was attached to, which means isolation alone does not protect credentials that a host proxy injects. The policy log also recorded no key injection, so affected teams cannot rely on logs to tell whether a key was sent out.
What to do
- Upgrade Docker Sandboxes to version 0.55.0 or later on every macOS, Windows and Linux machine.
- Rotate any Anthropic, OpenAI or GitHub keys that were granted to third-party kits while running a version before 0.55.0.
- Review which third-party kits have credential approvals and remove any you no longer need or trust.
- Check the scopes on GitHub tokens stored with sbx secret set, since they are global by default and may allow write access to repositories.