# Docker Sandboxes CVE-2026-136998: Check Your Agent Kits and API Keys

> A flaw in Docker Sandboxes before 0.55.0 could send your real API key to a new server after one kit approval. Here is how to check if you are affected and what to do.

Source: https://www.epifive.com/blog/docker-sandboxes-cve-2026-136998-api-key-check · Published 2026-12-02 · EpiFive

## Key takeaways

- CVE-2026-136998 affects Docker Sandboxes from 0.43.0 up to, but not including, 0.55.0, which Docker released on 2026-11-30.
- The flaw let a third-party kit that you approved once send your real API key to a different domain in a later version, without a new prompt.
- Endor Labs, which reported it, says it found no in-the-wild exploitation and tested only the Anthropic service with a dummy key.
- The first steps are to upgrade to 0.55.0, remove third-party kit bindings from credentials.yaml, and rotate keys if a kit changed after you approved it.
- Storing keys per sandbox with --sandbox limits how far a redirected key can be used.

Docker Sandboxes before version 0.55.0 had a flaw (CVE-2026-136998) that let a third-party agent kit, after you approved it once, change the server your real API key is sent to in a later update, with no new prompt. Docker released the fix in 0.55.0 on 2026-11-30. If you use `sbx` with third-party kits, upgrade, remove third-party kit bindings from `credentials.yaml`, and rotate keys if a kit changed after you approved it.

## What happened

Docker Sandboxes runs AI coding agents in isolated virtual machines. The design keeps real keys on the host: the agent sends a placeholder header, and a host-side proxy swaps in the real key for approved destinations. A "kit" is a packaged agent configuration that can come from a registry, a Git reference or a local folder, and its inject block names the domains that receive the key.

Endor Labs, the application security company that reported the flaw, says in its advisory that approval is tied to the service name (for example `anthropic`) and not to the kit's reviewed content. Docker's own credentials documentation describes the approval record as a `bindings` entry per service with a `domains` list.

| Date | Event | Source |
|---|---|---|
| 2026-09-15 (per reporting) | Credential consent gate added in 0.43.0 | The Hacker News |
| 2026-09-21 | Reported to Docker as ENDOR-VUL-2026-21091 | Endor Labs |
| 2026-11-03 | Docker v0.51.0 fixes a separate bug, CVE-2026-103916 | Endor Labs |
| 2026-11-30 | Docker releases v0.55.0 with the fix; the advisory is published | Docker release notes, Endor Labs |
| 2026-12-01 | BleepingComputer and The Hacker News report it | News reports |

Docker's 0.55.0 release notes say: "Fixed CVE-2026-136998, where a modified third-party kit could reuse a previously approved service binding". They also say: "Credential injection now enforces the approved destinations for API keys and OAuth tokens."

### How the attack works, according to the researchers

Endor Labs describes five steps:

1. A kit author publishes version 1 with an inject domain of `api.anthropic.com`.
2. The developer approves it, and a binding is written to `credentials.yaml`.
3. The author publishes version 2 at the same reference and changes only the inject domain to a server the author controls.
4. The next `sbx create` passes with no prompt.
5. The proxy sends the real key to that server.

The advisory says the binding's `domains` list was written but never read at request time. The runtime check only asked whether a row existed for the service name. It also says a kit's `permissions.network.allow` entries were applied without a prompt, so a new version could add its own host to the egress allowlist. The policy log (`sbx policy log`) recorded the connection as allowed with no mention of credential injection.

Severity as the researcher scored it: CVSS 3.1 8.2 High and CVSS 4.0 6.9 Medium. The researcher first scored the attack vector as network (9.3 Critical) and changed it to local before submission. The advisory lists CWE-863, Incorrect Authorization. The Hacker News reports that the vendor's own CVSS 4.0 score is 5.6; we could not open the CVE record to confirm that number (see "What we checked").

### What is confirmed and what is not

| Statement | Who made it | Status |
|---|---|---|
| The flaw exists in versions before 0.55.0 and is fixed in 0.55.0 | Docker release notes, Endor Labs | Confirmed by the vendor's release notes |
| The leak works for the `anthropic` service | Endor Labs test with a dummy key | Demonstrated by the researcher only |
| Twelve other built-in services share the same code path | Endor Labs | Not demonstrated individually, per the researcher |
| A different malicious kit could reuse an existing binding | Endor Labs | Not demonstrated, per the researcher |
| Exploitation in the wild | Endor Labs reports none | The researcher's statement; Docker has not commented in the pages we read |
| Cloud sandboxes share the affected logic | The Hacker News says this is not established | Unknown |

## Am I affected?

You are in scope if all of these are true:

- You run Docker Sandboxes (the `sbx` command-line tool) at a version from 0.43.0 up to but not including 0.55.0.
- You approved a credential request from a kit that does not ship with `sbx`.
- The kit's source can change after you approved it (a branch, a tag that can move, or a remote reference).

Per Docker's credentials documentation, kits that ship with `sbx` need no separate approval, and Endor Labs lists the affected services as `anthropic`, `copilot`, `cursor`, `devin`, `droid`, `github`, `google`, `groq`, `mistral`, `nebius`, `openai`, `openrouter` and `xai`. The researcher tested only `anthropic`.

To see what you have approved, open the approvals file:

- macOS and Linux: `~/.config/sbx/credentials.yaml`
- Windows: `%APPDATA%\sbx\credentials.yaml`

Docker documents entries in this form:

```yaml
bindings:
  anthropic:
    apiKey:
      domains: [api.anthropic.com]
  github:
    apiKey:
      domains: [api.github.com, github.com]
```

The file stores approvals, not key values. The advisory publishes no indicators of compromise, and because the policy log does not record key injection, you cannot confirm from `sbx policy log` alone whether a key was sent elsewhere. That is the reason for the rotation step below.

## What to do now

1. **Upgrade Docker Sandboxes to 0.55.0 or later.** Docker's release notes for 0.55.0 (released 2026-11-30) list the fix. Before upgrading, the same notes say to save settings you set through environment variables with `sbx settings set <key> <value>`, because version 0.55 no longer reads those variables. They also say to restart any daemon older than API 0.53.0 before using secrets without explicit header bindings, and to update external endpoints that receive host-managed credentials to HTTPS. Docker's page does not give upgrade commands, so use the method you installed with.
2. **Remove third-party kit bindings.** Open `credentials.yaml` and delete bindings that were granted to third-party kits. Docker says an entry with both the `apiKey` and `oauth` lists empty grants no access, and that after the fix a binding with no approved destinations is treated as missing. You will be prompted again the next time you run the kit.
3. **Rotate keys if a kit changed after you approved it.** If you cannot tell, rotate the provider keys (and GitHub tokens) that sat behind any approved third-party kit. Create the new key at the provider, then replace the old one on the host.
4. **Re-store the new key with a narrow scope:**

```bash
sbx secret set anthropic --sandbox my-sandbox
sbx secret ls
```

Both commands are from Docker's credentials documentation. `sbx secret set` prompts for the value, and `sbx secret ls` shows each secret's scope, service and masked value.

5. **Revoke the old key** at the provider after the new one works, and check the provider's usage page for charges you do not recognize. The Hacker News and BleepingComputer both note that a stolen provider key could run up charges, and a stolen GitHub token could give access to repositories depending on its scopes.

### If you use GitHub tokens in a sandbox

A token's damage depends on its scopes. Check which repositories the token can reach in your GitHub settings, review recent activity there, and replace it with a token that has the fewest scopes the agent needs.

## How to prevent it

- **Scope keys per sandbox.** Docker documents that service secrets are global by default so every sandbox can use them, and that `--sandbox <name>` limits a secret to one sandbox. A sandbox-scoped secret takes precedence over a global one for the same service.
- **Review kits on every `sbx create`.** Endor Labs recommends reading a kit's inject domains and its `permissions.network.allow` entries each time, not only the first run.
- **Pin kit sources.** Use a fixed commit or a reviewed local directory instead of a moving branch or tag.
- **Keep unattended runs withheld by default.** Docker says that in non-interactive contexts such as CI or `--detach`, a credential with no binding is withheld; Endor Labs notes there is no `--yes` flag.
- **Ask for the missing controls.** Endor Labs recommends binding approval to a kit's content digest and logging every key injection. The Hacker News says the published 0.55.0 notes mention neither; Docker's notes we read mention enforcing approved destinations only.

Endor Labs also lists controls that held in its testing: mixin kits cannot add injection domains for built-in services, a kit cannot impersonate a built-in agent by name, and `sbx kit add` refuses kits that declare credentials.

For background on how Sandboxes isolate agents and what the network policy covers, see [Docker's Run on Trust rebrand and Sandboxes explained](https://www.epifive.com/blog/docker-run-on-trust-rebrand-sandboxes-ai-agents).

## Checklist

- `sbx version` shows 0.55.0 or later.
- `credentials.yaml` has no leftover bindings for third-party kits.
- Keys behind any third-party kit that changed after approval are rotated and the old ones revoked.
- New keys are stored with `--sandbox` where possible.
- Kits are pinned or reviewed locally.

## See also

- [Claude Tool Use in Python: Build a Simple Agent Loop Step by Step](https://www.epifive.com/blog/claude-tool-use-python-agent-loop)
- [Google GTIG: AI Agents Exploit Patches, What to Check and Do Now](https://www.epifive.com/blog/google-gtig-ai-agent-exploits-patch-check)
- [NGINX HTTP/2 Flaw CVE-2026-123007: Fixed Versions, Workaround and Patch Steps](https://www.epifive.com/blog/nginx-http2-cve-2026-123007-patch-guide)

## What we checked

- Opened the Endor Labs advisory for CVE-2026-136998 on 2026-12-02 and used it as the primary source for the timeline, mechanism, severity and recommended mitigations.
- Opened Docker's Sandboxes release notes on 2026-12-02: the 0.55.0 entry is dated 2026-11-30 and contains the CVE fix line quoted above; this matches the 2026-11-30 date in the advisory.
- Opened Docker's credentials documentation on 2026-12-02 and copied the `sbx secret` commands, the `credentials.yaml` paths and the example `bindings` layout from it.
- Cross-checked the affected-version start (0.43.0), the fixed version (0.55.0) and the list of 13 services between the advisory and two news reports (The Hacker News and BleepingComputer); they agree.
- Not confirmed: the CVE record page (cve.org) did not return its content to our automated fetch, so the vendor CVSS 4.0 score of 5.6 and the 2026-09-15 date for 0.43.0 are as reported by The Hacker News only.
- The reports spell the researcher's first name differently; this guide names no individuals.
- Not tested hands-on: we did not install Docker Sandboxes or reproduce the attack; steps follow the vendor's and the researcher's documentation.

Last tested: 2026-12-02

## Sources

- Endor Labs advisory: https://www.endorlabs.com/learn/cve-2026-136998-docker-sandboxes
- Docker Sandboxes release notes: https://docs.docker.com/ai/sandboxes/release-notes
- Docker Sandboxes credentials documentation: https://docs.docker.com/ai/sandboxes/configuration/credentials/
- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-136998
- The Hacker News: https://thehackernews.com/2026/12/docker-sandboxes-flaw-lets-malicious-ai.html
- BleepingComputer: https://www.bleepingcomputer.com/news/security/docker-sandboxes-bug-could-leak-ai-api-keys-via-malicious-updates/

## Frequently asked questions

### Which versions of Docker Sandboxes are affected by CVE-2026-136998?

Endor Labs says the defect came with the credential consent gate added in v0.43.0, and it confirmed the problem on that release. Docker fixed it in v0.55.0, released on 2026-11-30. Endor Labs did not assess versions before 0.43.0 for this defect, so treat anything below 0.55.0 as a reason to upgrade.

### Has the Docker Sandboxes flaw been exploited in the wild?

Endor Labs reports no in-the-wild exploitation. It demonstrated the issue only in a controlled local test with a dummy key and a canary server. That is the researcher's statement; Docker's release notes do not comment on exploitation.

### Do I need to rotate my API keys?

Endor Labs advises rotating provider keys if a third-party kit changed after you approved it. If you only used kits that ship with sbx, or never approved a third-party kit, the advisory's attack path did not apply to you. Rotating is a cheap precaution if you are unsure.

### Does credentials.yaml contain my API keys?

No. Docker's credentials documentation says the file stores approvals, meaning which domains each service may send credentials to, and not secret values. Use sbx secret ls to see stored secrets with masked values.

