A flaw in Docker Sandboxes, which runs AI coding agents inside isolated virtual machines, meant a third-party agent kit could steal the API keys the product is designed to keep out of the agent's reach.
After one approval from the developer, a later patch to that kit could send their real Anthropic, OpenAI, or GitHub key to a server the attacker controls, with no latest prompt, Endor Labs researcher Peyton Kennedy found. Docker fixed the flaw in version 0.55.0 yesterday.
It has been revealed that he demonstrated the flaw, tracked as CVE-2026-136998, with a dummy key and a test server on his own machine. No attacks using it have been reported so far.
The product's promise is that raw keys never enter the sandbox. A developer stores a key on the host with sbx secret set, 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.
Industry observers note that which destinations receive the real key is decided by the kit, a packaged agent configuration fetched from a registry, a Git reference, or a local folder. Since version 0.43.0, released September 15, approving a kit's credential request writes a binding that records the service and the domains the developer agreed to.
Sources indicate that that recorded list was never read back, the researcher found. At request time, the check only asked whether a binding existed for the service name, and the proxy then sent the real key to whatever domains the current version of the kit named. "The domains the operator approved play no part in that decision," he wrote in his technical analysis.
Industry observers note that in his test, a kit approved with api.anthropic.com as its only destination was replaced at the same reference with a version that pointed to a test server instead. The next sandbox creation showed no prompt, and the proxy delivered the dummy key to that server in cleartext. The approval even survived the sandbox's deletion.
Nothing warned the developer afterward either: the policy log recorded the connection as allowed and mentioned nothing about a key being injected into it. A malicious kit version could also add its own server to the sandbox's network allowlist without a prompt, he found.
The flaw, introduced by the consent system added in 0.43.0, affects every version before 0.55.0 on macOS, Windows and Linux, according to the official CVE record the vendor published today.
Thirteen built-in integrations share the key-injection path, including Anthropic, OpenAI, GitHub, and Google, and Kennedy tested one of them, Anthropic, with a dummy value.
He rates the flaw 8.2, High, under CVSS 3.1, after first scoring it 9.3 Critical and correcting the attack vector to local: the malicious kit is a file the developer fetches, not a service an attacker reaches over the network. Under the newer CVSS 4.0 his score is 6.9 and the vendor's is 5.6, both Medium. The two vectors differ on whether harm to the provider account behind a stolen key counts in the base score.
The attacker never needs access to the developer's computer, only a one-time approval and a single changed line in the kit's next version. Other checks held in his testing: a kit cannot impersonate a built-in agent, and the consent prompt still defaults to decline.
It has been revealed that the damage follows the key. Secrets stored with sbx secret set are global by default, so a redirected key is the one every sandbox on the machine uses. A stolen GitHub token grants whatever its scopes allow, which for a typical developer token includes write access to their repositories, according to the researcher.
Sources indicate that the research covered the local product. Cloud sandboxes maintain a separate secret store, and it has not been established whether they ever shared the affected authorization logic.
Industry observers note that upgrading to 0.55.0 removes the flaw. The version's release notes say kit credential injection now enforces the destinations approved for API keys and for OAuth separately, and treats a binding with no approved destinations as missing.
For machines still on older versions, and for anyone who granted credentials to third-party kits while vulnerable, the researcher recommends a short set of steps:.
In a recent development, the researcher also asked Docker to tie approvals to a kit's content digest and to record every key injection in the policy log. The published notes confirm the destination enforcement and do not mention those two changes.
Industry observers note that the bug is his second in the product within a month, and both were reported to the vendor on September 21. The earlier one, a file-copy flaw that allowed an agent to access host files outside its approved folders, was fixed on November 3.
In both cases, he claims, the virtual machine boundary held, and the failure sat in what the developer's approval was attached to.
"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 revision inherits it.," Kennedy wrote.
Discover why SHA pinning alone isn't enough and learn how to close hidden security gaps in your GitHub Actions pipelines.
Learn what 6,000 real-world attacks reveal about MFA weaknesses and how to stop AI-driven phishing and account takeovers.
Get the latest news, expert insights, exclusive resources, and strategies from industry leaders, all for free.
