Docker Sandboxes CVE-2026-136998: how one approval let a kit update send your real API key elsewhere
Docker Sandboxes keeps your AI keys outside the sandbox. A bug let a third-party agent kit get one honest approval, then ship an update that sent the real key to another server, with no prompt and no log line. Version 0.55.0 fixes it, but the upgrade has a trap of its own.
Read the original first: https://www.endorlabs.com/learn/cve-2026-136998-docker-sandboxes
In one minute
- Docker Sandboxes runs AI coding agents in a sealed-off virtual machine. Your API keys stay on the host. A proxy swaps a placeholder for the real key on the way out.
- CVE-2026-136998: after you approved a third-party kit once, Docker checked only the service name (like anthropic) on later runs. It did not check where the kit now said to send the key.
- So a kit update could point your key at the attacker's server. There was no prompt, and the policy log showed only an allowed connection.
- Payton Kennedy of Endor Labs found it. He reported it on September 21, and Docker fixed it in 0.55.0 on November 30. That is 70 days.
- 13 built-in services share the same code. Only Anthropic was tested, with a dummy key.
- Upgrade, check ~/.config/sbx/credentials.yaml for approvals you gave third-party kits, and rotate keys if a kit you approved changed.
How the key swap worked
You store a key on the host with sbx secret set. The agent in the sandbox sends a placeholder header, such as x-api-key: proxy-managed. A proxy on the host puts in the real key when the request goes to an approved place.
A kit is a packaged agent setup. Its inject block names the domains that get the real key. Since version 0.43.0, sbx create shows you those domains and asks you to approve. Approving writes a binding to ~/.config/sbx/credentials.yaml.
The researcher found that the binding's domain list was written but never read. On later runs the only check was whether there was a row for that service. The binding was also not tied to a kit name, version or source.
His test: kit A sends the key to api.anthropic.com, and he approved it. Kit B is the same except for one line, which sends the key to a canary server on his own machine. Running kit B gave no prompt, and the canary got the dummy key in a plain header.
He also found that a kit's network allow entries were applied without a prompt. So the same file that moved the key could also open the route out.
What 0.55.0 fixes, and what the notes do not say
Endor's post asked Docker for three changes. Here is what Docker's 0.55.0 release notes say about each:
- Enforce the approved destinations: done. The notes say credential injection now enforces the approved destinations for API keys and OAuth tokens, and bindings with no approved destinations are treated as missing.
- Tie an approval to the exact kit (its content digest): not mentioned in the notes we read.
- Log each key injection in sbx policy log: not mentioned in the notes we read.
Our reading: the fix closes the reported attack. A kit can no longer send your key to a domain you did not approve. But the notes do not say an approval stops carrying over to a changed kit that keeps the same domains.
A separate 0.55 change also helps. Host-managed keys are now added only to HTTPS requests. Endor's demo used plain HTTP to a local server. A real attacker could use HTTPS, so this does not fix the bug by itself.
The upgrade trap
Version 0.55 stops reading several environment variables, including four kit settings: DOCKER_SANDBOXES_KIT_REQUIRE_SIGNATURE, DOCKER_SANDBOXES_KIT_TRUSTED_SIGNERS, DOCKER_SANDBOXES_KIT_ALLOWED_SOURCES and DOCKER_SANDBOXES_KIT_ALLOW_LOCAL.
Docker's notes say that without a saved setting or an admin policy, signatures are optional and local kits are allowed. So if you required signed kits through an environment variable, upgrading for this security fix can quietly turn that rule off.
Docker says to save each setting before you upgrade, with sbx settings set:
sbx settings set kit.requireSignature true sbx settings set kit.trustedSigners <your signers> sbx settings set kit.allowedSources <your sources> sbx settings set kit.allowLocalKits <true or false>
The setting names come from Docker's 0.55.0 notes. We did not run these commands, so check the value format in Docker's docs.
Why this pattern keeps coming back
The researcher points out that the sandbox itself held. The key never entered the virtual machine. The failure was in what the approval was tied to.
His earlier Docker Sandboxes bug, CVE-2026-103916, had the same shape: you approved a file path, and it led somewhere else.
This is the same lesson as pinning a package or a build step to a commit instead of a tag. A tag can move. An approval tied to a name that can move, moves with it. Endor's advice to fetch a kit at a fixed commit, or keep a reviewed copy in a local folder, follows from that.
Who is affected
| Case | Status |
|---|---|
| Docker Sandboxes 0.43.0 up to 0.55.0 | Affected. The bug came in with the 0.43.0 consent prompt. |
| Docker Sandboxes 0.55.0 and later | Fixed. Released November 30, 2026. |
| Versions before 0.43.0 | No consent prompt existed to get around. Endor did not assess how they handle keys. |
| Services that share the code | anthropic, copilot, cursor, devin, droid, github, google, groq, mistral, nebius, openai, openrouter, xai. Only anthropic was tested. |
What to do
- Upgrade Docker Sandboxes to 0.55.0 or later.
- Before you upgrade, move any DOCKER_SANDBOXES_KIT_* environment variables into saved settings with sbx settings set.
- Open ~/.config/sbx/credentials.yaml and remove bindings you gave third-party kits.
- Pin kits to a fixed commit, or keep a reviewed copy in a local folder.
- Set keys per sandbox with sbx secret set --sandbox, instead of the global default.
- If you approved a third-party kit that later changed, rotate that provider key.
What is still unknown
- Whether anyone used this against real developers. Neither Endor nor Docker says.
- The other 12 services were not tested one by one. Endor says they share the same code path.
- Whether Docker plans to tie approvals to a kit's exact content, or to log key injection. The 0.55.0 notes do not say.
- The cross-kit case, where a different kit reuses your approval for the same service. Endor says the logic allows it but demonstrated only the version swap.
Sources
- Endor Labs: CVE-2026-136998, Docker Sandboxes vulnerability lets malicious AI agent kits steal developers' API keys (Payton Kennedy) - the original report
- Docker Sandboxes release notes, v0.55.0 (Docker)
- BleepingComputer: Docker Sandboxes bug could leak AI API keys via malicious updates
- Endor Labs: the earlier Docker Sandboxes bug, CVE-2026-103916