Docker Sandboxes CVE-2026-136998: an updated agent kit could send your API keys to an attacker


A flaw in Docker Sandboxes let a third-party agent kit collect a developer’s approval once, then use a later update to send the developer’s real API key to a server the attacker controls. Peyton Kennedy of Endor Labs found it and published the details on 30 November. Docker fixed it the same day in version 0.55.0 and published CVE-2026-136998 on 1 December.
Docker Sandboxes (sbx) runs AI coding agents in isolated microVMs. Its
main promise is that raw API keys never enter the sandbox. The agent sends
requests with a placeholder, and a proxy on the host swaps in the real key
for approved destinations. That promise held. The problem was in how the
proxy decided where an approved key could go.
Who is exposed
The CVE record lists Docker Sandboxes from 0.43.0 up to, but not including, 0.55.0, on macOS, Windows and Linux. Version 0.43.0, released on 15 September, added the consent prompt that this flaw undermines. Versions before it had no approval mechanism to bypass, and Endor Labs didn’t assess them for this issue.
You’re exposed if you ran a third-party kit and approved its credential
request. Built-in kits don’t ask for approval. Keys set with
sbx secret set are global by default, so the key a kit could redirect is
the same one every sandbox on the machine uses.
How the attack worked
When a developer approves a kit’s credential request, sbx writes a binding
to credentials.yaml that names the service and the domains allowed to
receive the key. Kennedy found that the domains list was written but never
read. At request time, the proxy only checked whether a binding existed for
the service name. It then sent the real key to whatever domains the current
version of the kit asked for.
Kits are fetched by reference, from a tag, branch or directory, much like a package. So the attacker publishes an honest kit, waits for one approval, then changes one line at the same reference. The approval also survives deleting the sandbox. The same update can add the attacker’s host to the sandbox’s network allowlist, because a kit’s network permissions are applied without a prompt.
Kennedy tested it with a dummy Anthropic key and a local test server, which
received the key in plain text. He says all 13 built-in services share the
same code path, including OpenAI, GitHub, Google, Mistral and xAI, but he
only demonstrated Anthropic. The developer sees nothing. “The second sbx
create shows no prompt,” Kennedy writes, and sbx policy log records an
allowed connection with no sign that a key was added.
A stolen provider key means usage billed to the victim. A stolen GitHub token can give write access to the victim’s repositories.
How serious it is
The scores differ mainly on how much weight to give the stolen key’s impact on the provider account. Kennedy first scored the flaw 9.3 under CVSS 3.1, then corrected the attack vector to local before he reported it, which gave 8.2. Under CVSS 4.0 he gives 6.9. Docker’s score in the CVE record is 5.6, and it doesn’t count impact on other systems. CISA’s enrichment of the CVE record says there’s no known exploitation.
This is Kennedy’s second Docker Sandboxes finding in a month. The first,
CVE-2026-103916, let the sbx cp file-copy command reach outside a
sandbox’s allowed folders, and Docker fixed it in 0.51.0 on 3 November. He
reported this one on 21 September.
What changed in 0.55.0
According to the release notes, credential injection “now enforces the approved destinations for API keys and OAuth tokens”, and bindings with no approved destinations count as missing. The same release stops sending host-managed keys over plain HTTP. External endpoints must use HTTPS.
Version 0.55 also stops reading several environment variables, including
the ones for kit signature checks and allowed kit sources. If you rely on
them, save them with sbx settings set before you upgrade.
What to do
- Upgrade Docker Sandboxes to 0.55.0 on every machine. Before upgrading,
move any
DOCKER_SANDBOXES_KIT_*environment variables intosbx settings. - Open
~/.config/sbx/credentials.yaml(%APPDATA%\sbx\credentials.yamlon Windows) and remove bindings you granted to third-party kits. - Rotate any provider key or GitHub token you used with a third-party kit that changed after you approved it.
- Pin kits to a fixed commit, or keep a reviewed copy in a local directory, rather than fetching a tag or branch.
- Consider
sbx settings set kit.requireSignature trueand thekit.allowedSourcessetting to limit which kits can run. - Scope keys to a single sandbox with
sbx secret set --sandboxwhere you can, instead of the global default. - Read a kit’s inject domains and network permissions every time you create a sandbox from it, not just the first time.