Docker has fixed a flaw in Docker Sandboxes, the tool that runs AI coding agents inside isolated virtual machines, that could let a third-party agent kit steal the API keys the product is built to keep away from the agent. After a developer approved a kit once, a later update could send their real Anthropic, OpenAI or GitHub key to a server the attacker controls, with no new prompt. No attacks have been reported, and the fix is in version 0.55.0.
What happened
Docker Sandboxes keeps real keys on the host. The agent inside the virtual machine sends requests with a placeholder header, and a proxy on the host swaps in the real key on the way out. A kit, meaning a packaged agent configuration fetched from a registry, a Git reference or a local folder, decides which domains receive the real key.
Endor Labs researcher Peyton Kennedy found that the approval step did not hold up. Version 0.43.0 added a consent prompt that records the service and the domains a developer agrees to. But the recorded domain list was never read back. At request time the product only checked whether an approval existed for the service name, then sent the real key to whatever domains the current kit version named. The approval was also not tied to a specific kit or version.
In a test with a dummy key and a server on his own machine, a kit approved for api.anthropic.com was swapped at the same reference for a version pointing at a test server. The next sandbox creation showed no prompt, and the proxy delivered the dummy key in cleartext. Per the research, a malicious kit version could also add its own server to the sandbox network allowlist without a prompt. The policy log recorded the connection as allowed and nothing about a key being injected.
Who is affected
The flaw affects Docker Sandboxes from 0.43.0 up to, but not including, 0.55.0 on macOS, Windows and Linux. Thirteen built-in services share the same key-injection path, including Anthropic, OpenAI, GitHub and Google. The researcher tested only Anthropic, with a dummy value.
The risk follows the key. Keys stored with sbx secret set are global by default, so a redirected key is the one every sandbox on the machine uses. A stolen AI provider key means usage billed to the victim. A stolen GitHub token carries whatever scopes it was granted, which for a typical developer token can include write access to repositories.
Endor Labs rates the flaw 8.2 (High) under CVSS 3.1 and 6.9 (Medium) under CVSS 4.0. The Hacker News reports the vendor’s CVSS 4.0 score is 5.6, also Medium. The attacker needs no access to the developer’s machine, only one approval and a changed line in a later kit version.
What to do
Docker released 0.55.0 on November 30, 2026. Its release notes say kit credential injection now enforces the approved destinations for API keys and OAuth separately, and treats a binding with no approved destinations as missing. Steps from the researcher:
- Upgrade Docker Sandboxes to 0.55.0.
- Review
~/.config/sbx/credentials.yaml(%APPDATA%\sbx\credentials.yamlon Windows) and remove any approval granted to a third-party kit. - Read a kit’s inject domains and its network allow entries on every
sbx create, not only the first. - Pin kits to a fixed commit, or keep a reviewed local copy, where the kit source allows it.
- Store keys per sandbox with the
--sandboxflag instead of globally. - Rotate provider keys behind any approved third-party kit that later changed.
Our analysis: treat agent kits like any other dependency. An approval only protects you as long as it stays attached to the exact thing you reviewed, so prefer pinned versions and keys with narrow scopes and spending limits.
What we still do not know
There are no public reports of this flaw being exploited, and the researcher’s tests used dummy credentials. It has not been established whether Docker’s cloud sandboxes, which keep a separate secret store, ever shared the affected logic. The researcher also asked Docker to tie approvals to a kit’s content digest and to log every key injection; the published release notes confirm the destination checks but do not mention those two changes.
Sources: Endor Labs, CVE-2026-136998: Docker Sandboxes Vulnerability Allows Malicious AI Agent Kits to Steal Developers’ API Keys (Nov 30, 2026); The Hacker News, Docker Sandboxes Flaw Lets Malicious AI Agent Kit Updates Steal Developers’ API Keys (Dec 1, 2026).
Leave a Reply