Shield gate and glass container boxes holding golden API keys on a deep navy background, with the Docker logo in a white badge at the centre

A flaw in Docker Sandboxes could let a malicious agent kit steal the real API keys for your AI coding tools — after you approve it just once. The vulnerability, tracked as CVE-2026-136998, was disclosed on 30 November 2026 and fixed in Docker Sandboxes v0.55.0. If you run Claude Code or Codex inside a sandbox, upgrade now, then check whether any kit you approved has changed since.

Docker Sandboxes runs AI coding agents in small virtual machines — microVMs — kept separate from your own computer. The idea is simple: your raw API keys never enter the sandbox at all. You store a key on the host with sbx secret set, the agent sends its requests with a placeholder header such as x-api-key: proxy-managed, and a proxy on the host swaps in the real key only for destinations you approved.

How the Trust Model Was Supposed to Work

The whole design rests on one promise: the agent inside the sandbox never sees a real credential. When an agent needs to call an AI provider, it sends the request through a proxy that runs on your host machine. The proxy checks the destination against an approved list, then replaces the placeholder header with the real key before the request leaves your computer.

Before any of that happens, you approve the arrangement. Docker Sandboxes added a credential consent gate in v0.43.0: the first time an agent kit asks to use a service, you review the request and approve it. That approval is the trust boundary. Everything after it — which kit is running, which destination the key goes to — is supposed to follow from the choice you made at that moment.

Agent kits are the packaged configurations that set up an agent inside a sandbox: which model it uses, which tools it can call, which services it may reach. Kits can come from Docker itself, or from third parties. A third-party kit is convenient — someone else has already wired up a useful agent — but it is also code you did not write, running with access to your credentials.

The Flaw: One Approval Reused by a Changed Kit

Endor Labs, the security firm that found the flaw, showed that a malicious third-party kit can collect one honest approval from you, then push an update that sends your real Anthropic, OpenAI, or GitHub key to an attacker-controlled server. There is no new prompt, no warning, and no log record that a key was sent. The researcher-rated severity is 8.2 High under CVSS 3.1 and 6.9 Medium under CVSS 4.0.

The root cause is how Docker remembered your approval. It recorded the approval by service name — "Anthropic", "OpenAI", "GitHub" — instead of by the identity of the kit you actually reviewed. It never checked the kit's name, its content digest, or where it came from. So when the kit changed, the approval did not.

Kits are fetched by reference: a tag, a branch, or a directory. A reference that can change is a reference that can be updated without you noticing. Point a kit at a branch, and whoever controls that branch can replace its contents. The new version inherits the old approval automatically, because as far as Docker is concerned, the approval belongs to the service, not to the kit.

There was a second failure on top of that. The approved domain list in the credential binding — the list of destinations the key is allowed to reach — is written down but never enforced at runtime. Even if the binding says the key may only go to the provider's own API, nothing stops the proxy from sending it somewhere else.

The Flaw at a Glance

Fact Detail
CVE ID CVE-2026-136998 (Endor Labs ID ENDOR-VUL-2026-21091)
Severity 8.2 High (CVSS 3.1) / 6.9 Medium (CVSS 4.0)
Introduced v0.43.0, the release that added the credential consent gate
Reported to Docker 21 September 2026, by Endor Labs
Fixed in v0.55.0, released 30 November 2026
Disclosed 30 November 2026
What breaks Approval is remembered by service name, not by kit identity
What does not break The microVM itself — this is not a VM escape

All 13 Affected Services Share One Injection Path

Every built-in service in Docker Sandboxes uses the same credential injection path, so the flaw is not limited to one provider. The affected services are Anthropic, Copilot, Cursor, Devin, Droid, GitHub, Google, Groq, Mistral, Nebius, OpenAI, OpenRouter, and xAI. If you use any of them through a sandbox, the same approval-reuse problem applies.

The scope is wider than one sandbox, too. Credentials are stored globally by default when you run sbx secret set, so the key that gets redirected is the same one every sandbox on the machine uses. One compromised kit does not just affect one agent session — it can expose the key your whole setup shares.

What an Attacker Could Do With a Stolen Key

A stolen AI provider key is worth money directly. Whoever holds it can run API calls on your account, and you get the bill. At the scale of modern models, that can add up fast — and because the key is yours, the usage looks legitimate to the provider until you notice the charges or hit a limit.

A stolen GitHub token is worse in a different way. Many developers grant tokens write access so agents can push commits, open pull requests, and manage issues. A token with write access lets an attacker modify your repositories: push malicious code, change workflows, or open pull requests that look like they came from you. That is why the advice below includes checking your GitHub activity, not just your API bills.

It is worth stating what did not happen. No theft of real credentials was documented. Endor Labs confirmed the flaw using a dummy Anthropic key, and the researchers reported it to Docker responsibly. The danger is what the flaw makes possible, not what has already been observed in the wild.

How the Flaw Was Found and Proved

Endor Labs reported the vulnerability to Docker on 21 September 2026. To prove it, the researchers set up a kit that behaved honestly at first, collected the developer's approval, and then updated itself to redirect the credential to a server they controlled. The real key went out with no new prompt and no warning.

The most telling detail is what the logs showed. The policy log recorded an allowed connection — the request itself looked fine. But it did not record that a credential had been sent along with it. A developer reviewing logs after the fact would see nothing unusual. The exfiltration is invisible in the very place you would look for it.

This was the researcher's second Docker Sandboxes finding, after CVE-2026-103916, a file-copy escape. That history matters for one reason: it shows the sandbox's security model is being tested by people who understand it well. But this flaw is different in kind — it is not a VM escape. The microVM stayed isolated throughout. The attack never broke out of the sandbox; it abused the trusted channel that was built to carry credentials in.

The 4-Step Check: What to Do Now

Step 1 — Upgrade to v0.55.0 or later. The fix closes the approval-reuse hole. This is the single most important step, and it takes minutes. Check your installed version first — if you installed Docker Sandboxes when it launched and never updated, you are almost certainly on an affected version.

Step 2 — Review your existing credential approvals. Look at which third-party kits you have approved, and whether any of them has changed since you approved it. If a kit's contents, source, or behaviour looks different from what you reviewed, treat the approval as untrusted. While you are there, limit credentials to the sandboxes that actually need them instead of storing everything globally.

Step 3 — Rotate the affected keys if anything changed. If an approved kit changed unexpectedly, assume the worst and rotate the keys it could reach. Then check your provider usage for calls you did not make, and review your GitHub activity for commits, pull requests, or workflow changes you do not recognise.

Step 4 — Pin kit versions from now on. Use a fixed, reviewed version of a kit rather than a branch or tag that can change under you. A pinned version cannot be swapped silently; an update becomes a deliberate decision you make after reviewing what changed. That one habit removes the entire attack path.

Best API Key Management Tools and Secrets Practices for AI Agents

This flaw is a reminder that API keys need managing, not just storing. The best API key management tools and secrets management for developers share the same principles: keys are scoped to the smallest permission they need, they are short-lived where possible, and every use is visible in a log you can actually audit.

Start with scoping. An AI agent rarely needs a key that can do everything your account can do. Give each agent its own key, limit it to the models and actions it needs, and set a spending cap at the provider if one is available. That way, even if a key leaks, the damage is bounded — and you can revoke one key without breaking every other agent you run.

Next, treat AI agent security tools as part of the workflow, not an afterthought. That means a secrets manager or vault for storage instead of plain environment files, rotation on a schedule rather than only after an incident, and usage alerts from your providers so an unusual spike reaches you before the bill does. None of this replaces the upgrade and the version pinning above — it limits the blast radius if something else goes wrong later.

One habit matters most for sandbox users specifically: never approve a credential request for a kit you have not read. A kit is code, and approving it is trusting it. If the kit comes from a third party, read what it does, check who maintains it, and pin the version. The convenience of a one-click agent setup is real, but it is not worth a key that can spend your money or rewrite your repositories.

What This Is Not

It is easy to confuse Docker Sandboxes with the browser sandboxes developers use to test HTML, CSS, and JavaScript. They are different things: Docker Sandboxes are microVMs that run AI coding agents on your machine, while the sandboxes in our guide to HTML, CSS, and JavaScript sandboxes are browser environments for safely previewing web code. This flaw affects only the Docker tool.

It is also a different kind of incident from the credential thefts that make headlines most often. The 1Password security incident involved data taken from a password manager's systems, and the Optimizely hack turned compromised websites into malware delivery. Here, nothing was breached from the outside — the sandbox did exactly what it was told to do, and the flaw was in what it remembered about your approval.

That distinction is why the fix is mostly on your side. Docker has patched the software, but the approvals you already granted and the keys already stored are yours to review. Upgrade, check what you approved, rotate anything suspicious, and pin your kits. Ten minutes of checking now is cheaper than discovering a stolen key in next month's usage report.

Frequently Asked Questions

What is CVE-2026-136998?

CVE-2026-136998 is a flaw in Docker Sandboxes where a malicious third-party agent kit can reuse a credential approval you already gave, then send your real Anthropic, OpenAI, or GitHub key to an attacker-controlled server. The approval was remembered by service name instead of by the kit you reviewed, and the approved domain list was never enforced at runtime. It was fixed in v0.55.0, released 30 November 2026.

Which services are affected by the Docker Sandboxes flaw?

All 13 built-in services share the same credential injection path: Anthropic, Copilot, Cursor, Devin, Droid, GitHub, Google, Groq, Mistral, Nebius, OpenAI, OpenRouter, and xAI. Credentials are stored globally by default, so the redirected key is the same one every sandbox on the machine uses. If you use any of these services through Docker Sandboxes, upgrade to v0.55.0 or later.

Am I affected if I only use official Docker kits?

The attack needs a malicious third-party kit that you approve and that later updates itself. Official kits from Docker do not do that. But the fix still matters: the flaw is in how approvals are remembered, and upgrading closes it for every kit. If you have ever approved a third-party kit, review that approval even after upgrading.

How do I know if a kit I approved has changed?

Compare the kit against what you reviewed when you approved it — its source, its contents, and its behaviour. If anything looks different, or you cannot tell whether it changed, treat the approval as untrusted: revoke it, rotate the keys the kit could reach, and check your provider usage for calls you did not make and your GitHub activity for changes you do not recognise.

Does this flaw break out of the sandbox virtual machine?

No. This is not a VM escape — the microVM stayed isolated throughout the researchers' tests. The attack abuses the trusted credential channel itself: the proxy that is supposed to inject your key only for approved destinations. The sandbox boundary held; the trust model around the key did not.

What are the best API key management tools for AI agents?

The strongest setups combine a secrets manager or vault for storage, per-agent keys scoped to the smallest permissions needed, short-lived credentials where the provider supports them, and usage alerts so unusual activity reaches you quickly. For sandbox users specifically, the most important practice is pinning kit versions and never approving a credential request for a kit you have not read. Tools help, but the approval decision is the real control.