Skip to content

Security Alert | Docker Sandboxes' Second CVE — Approve an Agent Kit Once, and a Later Update Can Steal Your API Key

Dec 2, 20266 min
TL;DRDocker Sandboxes binds a credential approval to a service name, not to the kit version or the domains approved at the time. An attacker gets one honest approval for a kit, then ships an update that points the same credential at their own server — with no new prompt and no log entry. Fixed in v0.55.0; if you run older versions, check every third-party kit binding in credentials.yaml right now.

Look up & save

Loading dictionary…

中文版

What happened

Peyton Kennedy, a researcher at AI supply-chain security firm Endor Labs, disclosed a second high-severity vulnerability in Docker Sandboxes — the product that runs AI coding agents like Claude Code and Codex inside isolated microVMs — tracked as CVE-2026-136998. The flaw sits in how the product remembers a developer's credential approval: the first time a developer approves a third-party agent kit's request to use an API key, Docker Sandboxes records only "this service has been approved," not the domains the developer saw at approval time, and not which version of the kit earned that approval. An attacker can exploit this by publishing an honest kit v1, waiting for approval, then shipping a v2 at the same reference that points the same credential at a server they control. The next time the developer creates a sandbox, no new prompt appears, and their real Anthropic, OpenAI, or GitHub key flows straight to the attacker. This is Endor Labs' second finding in the same product within a month; there's no evidence of in-the-wild exploitation so far.

Key facts

ItemDetail
Incident typeSupply-chain attack (third-party agent kit version swap) + credential exfiltration
Affected scopeDocker Sandboxes v0.43.0–v0.54.x (macOS/Windows/Linux); 13 built-in services, including anthropic, openai, github, and google, share the same injection path
SeverityHigh (CVSS 3.1: 8.2); CVSS 4.0 rates it Medium (6.9)
CVECVE-2026-136998 (CWE-863 Incorrect Authorization)
SourcesEndor Labs technical write-up, The Hacker News

Attack surface analysis

Docker Sandboxes' credential model is deliberately careful: the real key always stays on the host. An agent inside the sandbox sends requests with a placeholder header (x-api-key: proxy-managed), and a host-side proxy swaps in the real key right before the request leaves. Which destinations get the real key is decided by the kit's inject configuration, and the consent gate added in v0.43.0 does honestly list the destination domains and default to decline on first approval. The problem starts after that approval is written to ~/.config/sbx/credentials.yaml: every later sandbox creation checks only whether a binding exists for that service name — it never re-checks the domain list the developer actually agreed to, and it never checks the kit's version or content hash. That turns the attack into three simple moves: publish an honest kit v1 to earn approval, swap in a malicious v2 that points inject at an attacker-controlled server, then wait for the developer's next sbx create. No new prompt appears, and sbx policy log records only "connection allowed" — nothing shows that a credential rode along with it. Endor Labs even found a function in the binary named MissingDomainsForService, whose name describes exactly the missing check, that was never wired into the runtime path.

How a kit version swap bypasses Docker Sandboxes' credential binding
How a kit version swap bypasses Docker Sandboxes' credential bindingAfter a developer approves kit v1 for api.anthropic.com, the attacker swaps the same reference to a v2 that points at their own domain. sandboxd only checks whether the service name was approved, so no new prompt appears, and the real key flows to the attacker. approve kit v1 binding written kit v2 swaps domain sbx create again no new prompt real key leaks out Developer sandboxd Attacker
  1. Developer runs sbx create, approving kit v1 for api.anthropic.com
  2. sandboxd writes the approval into a binding, keyed only by the service name "anthropic"
  3. Attacker swaps the same kit reference to v2, pointing inject at their own server
  4. Developer runs sbx create again, against the same kit reference
  5. sandboxd only checks whether the binding exists — no new approval prompt
  6. The proxy injects the real key per kit v2's domain, delivering it to the attacker

The root cause is that the trust was bound to the wrong thing. What the developer approved was "this kit, declaring these domains, right now." What the system remembered was just "this service name." That turns a one-time review into a standing authorization that transfers to anyone who can publish an update at the same reference. This maps to OWASP LLM05: Supply Chain Vulnerabilities — a third-party agent plugin's update mechanism is used to swap behavior after review — and it's also a variant of LLM06: Excessive Agency, since the sandbox conflates "approved this service" with "approved where this specific request goes," granting a broader scope than the developer actually consented to. It's the same failure shape as the researcher's own finding a month earlier, CVE-2026-103916 (a symlink escape in sbx cp): the microVM isolation boundary itself never breaks in either case. Both bugs live in what a one-time approval ends up bound to.

Defenses

Immediate actions

  • Open ~/.config/sbx/credentials.yaml (%APPDATA%\sbx\credentials.yaml on Windows) and remove every binding granted to a third-party kit — each one is a standing authorization for whatever that kit's reference serves next
  • Upgrade to Docker Sandboxes v0.55.0; the release notes confirm that API key and OAuth destinations are now enforced separately at injection time
  • If you approved a third-party kit that has since been updated, rotate the provider credentials behind it (Anthropic, OpenAI, GitHub tokens, etc.)

Longer-term architecture

  • Use sbx secret set --sandbox to scope keys to a single sandbox instead of storing them globally, so one leak doesn't expose every sandbox on the machine
  • Where the kit source allows it, pin to a fixed commit instead of a tag or branch, closing off this exact "same reference, different content" swap
  • Re-check a kit's inject domains and permissions.network.allow entries on every sbx create, not just the first — don't assume a once-approved kit stays the same
  • This "one approval, then a silent swap via update" pattern is exactly what AI supply-chain security vendors in the watchlist's B7 group — Noma Security, Protect AI — are built to cover; worth evaluating whether their tooling can track version changes in agent kits and dependencies instead of relying on manually re-reading config files

Impact

No public exploitation has been observed, and Endor Labs' own demonstration used a dummy key against a canary server it controlled. But the exposure covers every Docker Sandboxes user who approved a third-party kit between v0.43.0 and the fixed v0.55.0 — all 13 built-in services share the same injection path (the researcher tested only anthropic; the other 12 weren't individually demonstrated but follow the same code path). What makes the stolen credential dangerous depends on what it is: a leaked model-provider key means the attacker's usage gets billed to the victim; a leaked GitHub token can carry write access to the victim's repositories, which is a much more serious outcome than a padded invoice. If your team runs coding agents in Docker Sandboxes and allows third-party kits, this is worth auditing now rather than waiting for the next advisory.

Today's takeaway

This incident and last month's sbx cp symlink escape are two versions of the same lesson: neither broke the sandbox's isolation wall. Both failed in the gap between what the developer agreed to and what the system actually remembered. Consent prompts get treated as a one-time gate, but if what's approved is a name rather than the content itself, the gate means nothing afterward — a good reminder, when reviewing any agent plugin's permission model, to ask whether what's being approved is "this request" or just "this label."

References