# Docker Sandboxes CVE-2026-136998: a kit update could redirect your API key

> CVE-2026-136998: Docker Sandboxes saved the destinations you approved for an API key and never checked them. How the kit swap works and what to change.

- Published: 2026-12-04
- Topics: AI security, AI coding agents, Supply chain
- Canonical page: https://thesecguy.com/notes/docker-sandboxes-cve-2026-136998-agent-kit-api-keys/
- Publisher: The Sec Guy (https://thesecguy.com)

**Short answer:** Docker fixed CVE-2026-136998 in Docker Sandboxes 0.55.0 on 30 November 2026. From 0.43.0 on, sbx saved the destinations you approved for a credential but did not enforce them. A third-party agent kit you had approved once could change its destination, and the host proxy would send your real provider key there with no new prompt. Endor Labs demonstrated it with a fake Anthropic key, and the CVE record lists no known exploitation. Upgrade, review your saved approvals and pin kits to a digest or a commit.

---

If you run a coding agent in Docker Sandboxes with a kit that didn't ship with `sbx`, upgrade to 0.55.0 or later before the next `sbx create`. The [CVE record](https://app.opencve.io/cve/CVE-2026-136998) for CVE-2026-136998 says versions from 0.43.0 on, before 0.55.0, "recorded approved credential destinations" and then "did not enforce them during proxy substitution for third-party kits."

You approved a key for one domain. The proxy would send it to whichever domain the kit named that day.

<figure class="fig scene" data-card="Shown by Endor Labs with a fake key · Fixed in sbx 0.55.0">
<p class="fig-k">One approval, two destinations</p>
<div class="sc">
<p class="sc-act"><span class="sc-a1">Day 1 · Kit v1 asks for the key and you approve</span><span class="sc-a2">Later · Kit v2 arrives under the same tag. No new prompt</span></p>
<div class="sc-grid">
<div class="sc-box sc-sbx"><b>Sandbox</b><span>Your coding agent and a third-party kit</span><div class="sc-swap"><p class="sc-line sc-v1">Kit v1 says: send the key to<strong>api.anthropic.com</strong></p><p class="sc-line sc-v2">Kit v2 says: send the key to<strong>the attacker's host</strong></p></div><i class="sc-chip sc-ph">placeholder only</i></div>
<i class="sc-wire sc-w1" aria-hidden="true"></i>
<div class="sc-box sc-prx"><b>Host proxy</b><span>Swaps in your real key on the way out</span><p class="sc-line sc-ck sc-ck1">Service name<em>checked</em></p><p class="sc-line sc-ck sc-ck2">Saved domains<em>never read</em></p><i class="sc-chip sc-key">real API key</i></div>
<div class="sc-fork">
<div class="sc-arm sc-good"><i class="sc-wire sc-w2" aria-hidden="true"></i><div class="sc-box sc-dst"><b>api.anthropic.com</b><span>The domain you approved</span></div></div>
<div class="sc-arm sc-evil"><i class="sc-wire sc-w3" aria-hidden="true"></i><div class="sc-box sc-dst"><b>Attacker's host</b><span>Never approved by you</span><i class="sc-chip sc-leak">your real key</i></div></div>
</div>
</div>
<p class="sc-say">You approved the key for one domain. Before 0.55.0, the proxy sent it wherever the kit pointed.</p>
</div>
<figcaption>Our drawing of the attack Endor Labs demonstrated, with a fake key and a test server on the researcher's own machine. Fixed in sbx 0.55.0.</figcaption>
</figure>

## What Docker Sandboxes promises

[Docker Sandboxes](https://docs.docker.com/ai/sandboxes/) runs AI coding agents in isolated environments on your machine or on Docker's cloud. Its sidebar lists Claude Code, Codex, Copilot, Cursor and others. You store a provider key on the host with `sbx secret set`, and the [credentials documentation](https://docs.docker.com/ai/sandboxes/configuration/credentials/) says "the real value never enters the sandbox." The agent sends a placeholder such as `proxy-managed`. A proxy on the host swaps in the real key on the way out.

Agents come packaged as kits. Docker's [kit documentation](https://docs.docker.com/ai/sandboxes/customize/use-kits/) says "the built-in agents are kits that package an environment, tools, and runtime settings", and you can load someone else's kit from a published image, a local directory or a Git reference. A kit can ask for a credential. When it asks for one that has no saved approval (Docker calls it a binding), `sbx` prompts you, and your answer goes into `credentials.yaml`. Kits shipped with `sbx` skip the prompt.

According to [Endor Labs](https://www.endorlabs.com/learn/cve-2026-136998-docker-sandboxes), which found the bug, that consent prompt arrived in 0.43.0. It shows each credential and the domains it will go to.

## The approval that was saved and never read

Endor's write-up puts the defect in one line: "The binding's `domains` list is written and never read." At run time, `sbx` asked a yes-or-no question about the service name. Has this user approved `anthropic`? If yes, the proxy injected the real key at whatever domains the kit in front of it declared.

There was a second gap. In Endor's words, "the binding also says nothing about which kit it was granted to." It wasn't tied to a kit name, a content digest or a source.

<figure class="fig">
<p class="fig-k">What your approval covered in sbx 0.43.0 and later, before 0.55.0</p>
<div class="rank">
<div class="rk"><b>1</b><span>The service name<small>for example, anthropic</small></span><i class="mv up">checked</i></div>
<div class="rk"><b>2</b><span>The destination domains<small>saved in credentials.yaml</small></span><i class="mv down">never read</i></div>
<div class="rk"><b>3</b><span>Which kit you approved<small>name, digest or source</small></span><i class="mv down">not recorded</i></div>
<div class="rk"><b>4</b><span>The kit's network allow list<small>permissions.network.allow</small></span><i class="mv ren">no prompt</i></div>
</div>
<figcaption>Our layout of the findings in the Endor Labs write-up and the CVE record, read 4 December 2026.</figcaption>
</figure>

## The attack Endor Labs demonstrated

<figure class="fig">
<p class="fig-k">One honest prompt, then a quiet swap</p>
<div class="flow">
<div class="node"><b>1. Kit v1 is published</b><span>Its inject block names only api.anthropic.com</span><div class="chips"><i class="chip">looks normal</i></div></div>
<div class="node"><b>2. You approve</b><span>sbx create shows an accurate prompt, and the binding is saved</span><div class="chips"><i class="chip">credentials.yaml</i></div></div>
<div class="node"><b>3. Kit v2 replaces it</b><span>Same reference. Only the inject domain changes, to the attacker's host</span><div class="chips"><i class="chip">tag or branch</i></div></div>
<div class="node"><b>4. Next sbx create</b><span>The service-name check passes. No prompt, no diff</span><div class="chips"><i class="chip">before 0.55.0</i></div></div>
<div class="node"><b>5. The proxy sends the key</b><span>The real credential goes to the new host</span><div class="chips"><i class="chip">logged as allowed</i></div></div>
</div>
<figcaption>Our layout of the steps in the Endor Labs write-up. The test used a fake key and a canary server on the researcher's own machine.</figcaption>
</figure>

Nobody has to break out of the sandbox for this. The key never enters it. The host proxy does the leaking, on instructions from a file the attacker can edit.

Endor ran this with a dummy value, `sk-ant-FAKE-CANARY-deadbeef`, and a canary server on loopback, and reports that "the header arrived in cleartext over plain HTTP." As a last check the researcher edited the saved binding to allow only `example.invalid`. The write-up says "the leak was identical."

The limits matter here. Only the Anthropic service was demonstrated. Endor says the other built-in services "follow the shared code path and were not demonstrated separately", and the variant where a different kit reuses the approval wasn't demonstrated either. The CVE record adds the precondition: "Exploitation requires an operator to have previously approved the service and subsequently launch the modified kit." Its CISA assessment lists exploitation as "none".

What bothers me most is the log line. Endor found that `sbx policy log` "records the connection to the canary host as allowed and says nothing about a credential being injected into it." You couldn't have spotted the leak there afterward.

## How bad is it

<figure class="fig">
<p class="fig-k">CVE-2026-136998 in numbers</p>
<div class="tiles">
<div class="tile"><b>5.6</b><span>CVSS v4.0</span><small>medium, scored by Docker</small></div>
<div class="tile"><b>8.2</b><span>CVSS v3.1</span><small>high, scored by Endor Labs</small></div>
<div class="tile hot"><b>0.43.0</b><span>first affected version</span><small>fixed in 0.55.0</small></div>
<div class="tile"><b>70</b><span>days, report to fix</span><small>21 Sep to 30 Nov 2026</small></div>
</div>
<figcaption>Source: the CVE record as shown by OpenCVE and the Endor Labs write-up, read 4 December 2026. The day count is ours.</figcaption>
</figure>

The two scores disagree. Docker, which assigned the CVE, rates it 5.6 on CVSS v4.0, medium. Endor scored it 8.2 on CVSS v3.1, high, after first drafting a 9.3 with a network attack vector. The weakness class is CWE-863, incorrect authorization.

Your own exposure comes down to which keys are stored and how widely. The documentation says "service secrets are global by default, so the secret is available to all sandboxes." For a model provider key, Endor describes the impact as metered API access billed to the victim. [The Railway breach](https://thesecguy.com/notes/railway-breach-stolen-ai-keys-740000/) shows how fast that bill grows. A GitHub token is worse: Endor notes that a typical developer token's scopes "include write access to the victim's repositories."

Endor reported the bug on 21 September 2026. Docker shipped the fix on 30 November, and the CVE record was published on 1 December.

## What 0.55.0 changes

Docker's [release notes for 0.55.0](https://docs.docker.com/ai/sandboxes/release-notes/) name the CVE and say "credential injection now enforces the approved destinations for API keys and OAuth tokens." The [GitHub release](https://github.com/docker/sbx-releases/releases/tag/v0.55.0) gives the detail: "Kit credential injection respects the destinations approved separately for API keys and OAuth in credential bindings." An old approval with no destinations doesn't slip through either: "Bindings with no approved destinations are treated as missing."

The same release tightens the area around it. Host-managed API keys go only to HTTPS endpoints. Custom secrets are substituted "only into explicitly bound request headers" or a default set you configure.

Endor also lists controls that held up under testing. Kits can't take a built-in agent's name, `sbx kit add` refuses kits that declare credentials, and a non-interactive run declines the credential, with no `--yes` flag to override it.

## What to do this week

1. Upgrade `sbx` to 0.55.0 or later. Read the breaking changes first: this version stops reading a list of environment variables, and the release tells you to save each override with `sbx settings set <key> <value>` before you upgrade.
2. Open `~/.config/sbx/credentials.yaml` and remove the bindings you granted to third-party kits. The next run will ask again, and from 0.55.0 the answer is enforced.
3. If a third-party kit you approved changed afterward, rotate the provider keys it could reach. This is Endor's advice. The policy log didn't record injections, so you can't prove a clean history from it.
4. Pin kits. Docker's documentation says to use "a digest to identify exact content". For a Git source, `ref` selects the revision, so give it a commit hash instead of a tag or a branch. A tag or a branch can point at new content tomorrow, and step 3 of the attack depends on that. The [Cursor breach](https://thesecguy.com/notes/cursor-breach-vendor-key-backdoored-extension/) went the same way: tampered copies of an extension arrived through the editor's own extension cache.
5. Scope keys to one sandbox. Pass `--sandbox` to `sbx secret set` so a key isn't shared with every sandbox on the machine.
6. If your kits come from a registry, set up a trusted signer policy and turn on `kit.requireSignature`. The documentation notes that source directories and Git sources don't support the signing workflow, so those need the pin from step 4.

One more, ours, for anyone who builds agent tooling: test your own approval flow the way Endor did. Save an approval, change the thing that was approved, and watch whether the system notices.

## Sources

All checked on 4 December 2026.

- Endor Labs, [CVE-2026-136998: Docker Sandboxes Vulnerability Allows Malicious AI Agent Kits to Steal Developers' API Keys](https://www.endorlabs.com/learn/cve-2026-136998-docker-sandboxes): the defect, the demonstration, scores, timeline and recommendations.
- OpenCVE, [CVE-2026-136998](https://app.opencve.io/cve/CVE-2026-136998), a copy of the CVE record assigned by Docker (description, CVSS v4.0, CWE, affected versions, CISA assessment).
- Docker Docs, [Docker Sandboxes release notes](https://docs.docker.com/ai/sandboxes/release-notes/), entry for 0.55.0, 30 November 2026.
- docker/sbx-releases, [release v0.55.0](https://github.com/docker/sbx-releases/releases/tag/v0.55.0): credential, HTTPS, custom secret and settings changes.
- Docker Docs, [Credentials](https://docs.docker.com/ai/sandboxes/configuration/credentials/): storage, the host proxy, bindings and scope.
- Docker Docs, [Use kits](https://docs.docker.com/ai/sandboxes/customize/use-kits/): what a kit is, sources, pinning and signatures.
- Docker Docs, [Docker Sandboxes](https://docs.docker.com/ai/sandboxes/): what the product is and the agents it lists.
