Docker Sandboxes flaw (CVE-2026-136998) can leak AI API keys
A credential-injection flaw in Docker Sandboxes let a malicious update to an already-approved agent kit redirect real API keys to an attacker. Fixed in 0.55.0; no abuse reported.
Docker Sandboxes (sbx) — the tool that runs AI coding agents in throwaway VMs — shipped a credential-injection flaw, CVE-2026-136998, that let a malicious update to a previously approved agent kit redirect your real provider API keys to an attacker-controlled server with no new prompt. It is fixed in 0.55.0, released November 30. No in-the-wild abuse has been reported.
What's affected
Every sbx build before 0.55.0, on macOS, Windows and Linux. The consent system that carries the bug was introduced in 0.43.0. The researcher counts 13 built-in integrations that share the same credential-injection path, including Anthropic, OpenAI, GitHub and Google — so a redirected key is not a niche edge case.
What the bug does
sbx stores a secret with sbx secret set, and a host-side proxy swaps the real key into the sandbox's placeholder requests. When a developer approves a kit's credential request, sbx records the service name and the approved destination domains. The flaw: at request time the check only confirmed that a binding existed for the service name. The approved domains were never read back.
So a malicious update to an already-approved kit can repoint the destination at an attacker server, and the proxy forwards the real key there, in cleartext, without re-prompting. Three details make it worse:
- The approval survives sandbox deletion, and the policy log records the connection as an ordinary allowed one — no mention of key injection.
- A kit can add its own server to the network allowlist without a prompt.
- Secrets set with
sbx secret setare global by default, so a redirected key is used by every sandbox on the machine.
Exploitation status
No attacks using this flaw have been reported. Peyton Kennedy of Endor Labs found it and reported it to Docker on September 21; the demonstration used a dummy Anthropic key against a test server. Scoring is contested: the researcher rated it 8.2 (High) under CVSS 3.1 (down from an initial 9.3 after changing the attack vector to local), and 6.9 under CVSS 4.0, while Docker scored it 5.6 (Medium) under 4.0. No IOCs were published — this is a local misuse-of-trust bug, not a network campaign.
Action checklist
- Upgrade to
sbx0.55.0 or later. The release notes state credential injection now enforces approved destinations for API keys and OAuth separately, and treats a binding with no approved destinations as missing. - Audit existing approvals. Review the approvals file —
~/.config/sbx/credentials.yamlon macOS/Linux,%APPDATA%\sbx\credentials.yamlon Windows — and remove any binding granted to a third-party kit. It records approvals, not key values. - Rotate keys behind any third-party kit you approved that later changed — treat them as potentially exposed.
- Pin kits to a fixed commit or keep a reviewed local copy, and re-check each kit's inject domains and
permissions.network.allowon everysbx create. - Scope secrets per sandbox with the
--sandboxflag instead of the global default.
Context
This is the latest in a run of credential-handling flaws in Docker's tooling: we covered CVE-2026-105445 in Docker Hub, where access tokens leaked during account-to-org conversions. The pattern with agent runners is narrower and newer — trust granted once to an AI kit is reused silently when that kit updates. If you let coding agents hold provider keys, the approval you clicked months ago is part of your attack surface.