Title: Docker Sandboxes Kept the Approval and Dropped the Domain List — A Third-Party Agent Kit Could Redirect Developers’ Real API Keys With One Quiet Update
Summary:
Endor Labs researcher Peyton Kennedy disclosed CVE-2026-136998, a flaw in Docker Sandboxes (the sbx CLI and sandboxd, which run AI coding agents inside isolated VMs) that breaks the product’s central promise in a different way than expected: raw credentials stay outside the VM throughout, but a kit gets to steer where the host proxy delivers them. Docker Sandboxes’ credential model has the developer store keys on the host with sbx secret set, the agent sends placeholder headers, and a host-side proxy substitutes the real key for approved destinations; since v0.43.0 (released September 15), a developer’s sign-off on a third-party kit’s credential request is stored as a binding in ~/.config/sbx/credentials.yaml that names the service plus the destinations the developer accepted. The defect: the approved domains list is recorded once and never consulted again — when a request came in, the gate did nothing beyond confirming a row existed for the service name, and the proxy substituted the real key at whichever destinations the kit’s then-current version declared. So one honest approval was all an attacker needed: republishing the kit at the same tag, branch or directory with only its inject domain changed routed the key to the attacker’s host on the next sbx create, with nothing asking the developer again and the policy log showing the connection as an ordinary allowed request, silent about the injected credential. Kennedy demonstrated it with a dummy Anthropic key and a loopback canary server, confirmed the dummy arriving in cleartext, noted the binding outlived the sandbox’s deletion, and showed a hostile kit version could also place its own host onto the sandbox’s egress allowlist via its permissions.network.allow entries, which apply without asking; all thirteen built-in integrations (anthropic, openai, github, google, groq, mistral, and others) travel through the same credential-substitution code path. The defect (CWE-863) dates to the v0.43.0 consent gate and spans that release through the v0.54.x line — per Kennedy’s version table, builds older than v0.43.0 had no binding mechanism to bypass and are not affected by this defect; he scored it 8.2 High under CVSS 3.1 (correcting his initial 9.3 Critical to a local vector) and 6.9 Medium under CVSS 4.0, versus Docker’s 5.6. Docker shipped the fix in v0.55.0 on November 30; its notes say credential injection is now bound to the approved destinations — tracked separately for API keys and for OAuth tokens — and that a binding carrying no approved destinations is treated as absent. Until machines are upgraded, Kennedy’s mitigation list amounts to: clear any binding in ~/.config/sbx/credentials.yaml (the Windows equivalent is %APPDATA%\sbx\credentials.yaml) that was granted to a third-party kit; check a kit’s inject domains and permissions.network.allow entries each time it is fetched with sbx create, not just on first use; pin kit sources to a fixed commit or keep a reviewed copy locally; store keys with --sandbox scoping rather than globally; and rotate the provider keys behind any third-party kit whose approval predates a change to the kit. Reported to Docker on September 21, no exploitation has been reported; it was Kennedy’s second Docker Sandboxes finding within a month, after a file-copy flaw fixed in v0.51.0 on November 3 — and in both findings the VM isolation itself never broke; what failed was the link between the developer’s approval and the artifact it was meant to cover.
References: