Docker Sandboxes Flaw (CVE-2026-136998): Agent Kits Leaked API Keys

A Docker Sandboxes flaw let a once-approved AI agent kit silently redirect a developer's real Anthropic, OpenAI, or GitHub key to an attacker after a routine update, with the policy log showing nothing unusual.

Docker fixed CVE-2026-136998 in Docker Sandboxes 0.55.0 on November 30, 2026, after Endor Labs researcher Payton Kennedy showed that a previously approved third-party AI agent kit could push an update that silently redirected a developer's real Anthropic, OpenAI, or GitHub key to an attacker-controlled server. No new approval prompt appeared. The policy log showed nothing unusual. Anyone running Docker Sandboxes to isolate Claude, Codex, or Copilot-style coding agents, or anyone who has installed a third-party agent kit into it, should check their version today.

How the key handoff is supposed to work

Docker Sandboxes runs AI coding agents inside isolated microVMs, using a CLI called sbx and a host daemon called sandboxd. The design goal is that the agent itself never sees a real credential. Keys live on the host; the agent inside the microVM only sends a placeholder header, and a proxy on the host swaps in the real value when a request goes to an approved API destination. A third-party "kit," a packaged agent configuration, has to declare which domains it needs a key sent to, and the developer approves that destination once, through sbx create.

Where the one-time approval stopped being checked

The flaw is a classic trust-on-first-use gap. Docker Sandboxes versions from 0.43.0 up to but not including 0.55.0 recorded the approved credential destination the first time a kit ran, but did not re-enforce that destination during proxy substitution on later runs. An attacker-controlled kit can reuse an existing, already-approved service binding and simply change where it injects the credential; the host proxy still fires, and it still sends the real key, now to the new address.

In Endor's proof of concept, a kit's inject block names only api.anthropic.com. The operator runs sbx create, reads a prompt that accurately says the key goes to that domain, and approves it. A later version of the same kit changes the destination. The second sbx create does not prompt again, because the service binding already exists.

The evidence trail is the part worth sitting with. A connection to the attacker's test host shows up in the audit trail as an ordinary, allowed network call. The policy log records the connection as allowed, but it does not record that a credential rode along with the request. Nothing distinguishes a routine outbound call from one carrying a live key. An engineer who reviews sbx policy log on a regular schedule, which is good practice, has no way to flag the difference after the fact.

What the demonstration and scope covered

Kennedy demonstrated the theft using a dummy Anthropic key, so no real credentials were exposed during the research itself. In a real exploitation, a stolen AI provider key could run up charges against the victim's account, and a stolen GitHub token could reach any repository within its scope. Endor Labs found that the vulnerable credential-handling code was shared across 13 of Docker Sandboxes' built-in service integrations: Anthropic, Copilot, Cursor, Devin, Droid, GitHub, Google, Groq, Mistral, Nebius, OpenAI, OpenRouter, and xAI. Kennedy also reported a related gap in the same area: a malicious kit update could add its own server to the sandbox's network allowlist without triggering a prompt at all.

Severity scoring split, which is worth noting for anyone triaging this internally. Kennedy rated the bug 8.2, High, under CVSS 3.1, after first scoring it 9.3 Critical and then correcting the attack vector to local, since the malicious kit is a file the developer has to fetch and run, not a service an attacker reaches directly over the network. Docker, acting as the CVE Numbering Authority, scored the same bug 5.6, Medium, under CVSS 4.0 once the record was finalized on December 1. Both scores describe one bug; they disagree on how much a local-only attack vector should discount it. This was also not Kennedy's first finding against the product. It was Endor's second Docker Sandboxes report, following CVE-2026-103916, a file-copy flaw that let an agent reach past the folders a sandbox was supposed to confine it to, fixed in v0.51.0 on November 3, 2026.

13
built-in services shared the vulnerable code, including Anthropic, OpenAI, and GitHub
70
days from Endor's private report (Sep 21) to the fix shipping in v0.55.0 (Nov 30)
8.2
CVSS 3.1 score the researcher assigned, down from an initial 9.3 Critical

Fix and what to check now

Docker Sandboxes 0.43.0 shipped the credential consent gate on September 15, 2026. The bug sat inside that gate's enforcement logic from that release until the fix. The 0.55.0 release notes say kit credential injection now enforces the destinations approved for API keys and for OAuth tokens separately, and treats a binding with no approved destination as missing rather than defaulting it open. Kennedy also asked Docker to tie approvals to a kit's content digest, so an update can't silently reuse an old approval, and to record every key injection event directly in the policy log, which would close the audit gap described above. Docker Sandboxes Cloud was not assessed in this research; it uses a separate, cloud-side credential store.

  • Upgrade. Move to Docker Sandboxes 0.55.0 and review every credential approval you previously granted to a third-party kit.
  • Re-read kits on every run, not just the first. Check a kit's declared inject domains and its permissions.network.allow entries on every sbx create, not only the first time you install it.
  • Scope keys narrowly and pin versions. Set keys per sandbox rather than globally, and pin third-party kits to a fixed commit instead of a branch or tag where that's an option.

No active exploitation has been reported so far. That's worth stating plainly rather than implying more: it means no one has published evidence of abuse yet, not that none occurred. The underlying lesson holds regardless. Keeping the literal key out of an agent's prompt does nothing if the surrounding execution environment, the proxy, the approval cache, the policy engine, still trusts a destination it only ever checked once. More on that boundary in our security coverage and our notes on the AI gateway pattern.

KnoxCall sits in a similar credential-injection position, swapping a token for the real key at call time instead of handing the key to the client at all, and this incident is a plain reminder that whatever does that swapping has to re-check the destination on every call, not just the first one it ever saw.

Frequently asked questions

What is CVE-2026-136998?

CVE-2026-136998 is a flaw in Docker Sandboxes, versions 0.43.0 through 0.54.x, where a previously approved third-party AI agent kit could push an update that changed where a real API key was sent, without triggering a new approval prompt. Endor Labs researcher Payton Kennedy found it and Docker fixed it in Sandboxes 0.55.0, released November 30, 2026.

Is the Docker Sandboxes CVE-2026-136998 flaw being exploited in the wild?

No active exploitation has been reported as of the disclosure. Kennedy demonstrated the issue safely using a dummy Anthropic key rather than a real credential, and coverage of the flaw has not pointed to any confirmed real-world attacks using this technique.

How do I fix the Docker Sandboxes API key leak?

Upgrade to Docker Sandboxes 0.55.0 or later, which enforces approved credential destinations during proxy substitution instead of just recording them once. You should also review every credential approval you previously granted to third-party kits, since those old approvals are exactly what the flaw abused.

Which AI API keys were affected by the Docker Sandboxes vulnerability?

The vulnerable credential-handling code was shared across 13 built-in service integrations, including Anthropic, OpenAI, GitHub, Google, Groq, Mistral, and xAI, among others. Any credential injected through one of those integrations in an affected version could, in theory, be redirected by a malicious kit update.

Sources

  1. Docker Sandboxes bug could leak AI API keys via malicious updates
  2. CVE-2026-136998: Docker Sandboxes Vulnerability Allows Malicious AI Agent Kits to Steal Developers' API Keys
  3. Docker Sandboxes flaw let rogue agent kits send your AI API keys to attackers
  4. Docker Sandboxes Flaw Lets Malicious AI Agent Kit Updates Steal Developers' API Keys
  5. The Consent Prompt Was Honest. Nothing Read the Answer: CVE-2026-136998 in Docker Sandboxes
  6. CVE-2026-136998: Credential disclosure in Docker Sandboxes before 0.55.0
  7. Docker Sandboxes flaw could expose AI API keys through malicious kit updates
  8. Docker fixes flaw that could expose AI API keys through malicious updates

A kit update shouldn't be able to redirect a key nobody re-approved

This incident is a reminder that keeping a key out of an agent's prompt only helps if the proxy injecting it re-checks the destination on every call, not just the first one.

Start Free →

Or get new posts by email. Double opt-in, unsubscribe anytime.