Developers increasingly run autonomous AI coding agents inside isolated microVMs to keep untrusted model actions away from host files and production secrets. Docker Sandboxes built its security model around a straightforward boundary: raw API tokens stay on the developer workstation while an outbound host proxy injects credentials only for approved destinations. On November 30, 2026, Docker shipped v0.55.0 and on December 1, 2026 published CVE-2026-136998 (CWE-863), exposing a critical authorization gap across releases v0.43.0 through v0.54.x that let updated third-party agent kits redirect real Anthropic, OpenAI, and GitHub secrets straight to attacker servers.

Disclosed by Endor Labs security researcher Peyton Kennedy (ENDOR-VUL-2026-21091), the defect carried a CVSS 3.1 score of 8.2 High from the finder (6.9 Medium under CVSS 4.0, versus Docker's vendor score of 5.6 Medium). No active exploitation in the wild has been reported, yet the underlying flaw exposes a crucial lesson for engineering teams running local AI agents: host-side credential proxies fail whenever destination bindings and outbound network policies lack verifiable enforcement at the transport layer.

How Host-Proxy Secret Substitution Broke in Docker Sandboxes

To prevent prompt-injected coding assistants from reading .env files or printing environment variables, Docker Sandboxes separates credential storage from the microVM runtime. Engineers register secrets on the host through sbx secret set, while code executing inside the sandbox transmits HTTP requests containing placeholder authentication strings such as x-api-key: proxy-managed. The host daemon (sandboxd) intercepts those outbound requests and swaps the sentinel header for the stored secret before traffic leaves the workstation.

Starting with v0.43.0 (released September 15, 2026), Docker introduced an interactive consent gate for third-party agent kits—packaged agent definitions pulled from OCI registries, Git branches, or local folders. When an operator launched a kit via sbx create, the terminal displayed each requested service and the destination hostnames defined inside the kit's inject block. Approving the prompt wrote a YAML entry inside ~/.config/sbx/credentials.yaml mapping the service name to those approved domains, such as api.anthropic.com.

Inspection of the runtime authorization path revealed a silent failure: sandboxd saved the domains array during initial consent, then ignored that list on every subsequent proxy request. At injection time, the proxy only checked whether any binding row existed for the service key (anthropic, openai, github, and ten sibling integrations). Even more telling, Endor Labs noted an unused helper symbol (sandboxlib/bindingconsent.MissingDomainsForService) already present inside the compiled binary, confirming that destination validation logic existed without wiring into the active proxy gate.

+------------------------------------------------------------------------------+
|        CVE-2026-136998: CREDENTIAL BINDING VERSION SWAP IN DOCKER SANDBOXES  |
+------------------------------------------------------------------------------+
|  Phase 1 (t0): Operator launches clean Kit v1 (inject -> api.anthropic.com)  |
|  [sbx create ./kit-v1] --> Operator approves prompt                          |
|         --> Writes ~/.config/sbx/credentials.yaml (service: anthropic)       |
|                                                                              |
|  Phase 2 (teardown + silent update): Kit maintainer pushes Kit v2            |
|  [sbx rm --force demo] --> credentials.yaml binding persists across rebuilds |
|  Kit v2 modifies inject block -> attacker.example AND adds host to allowlist |
|                                                                              |
|  Phase 3 (t1): Next sbx create runs without consent prompt or log warning    |
|  [MicroVM] --(x-api-key: proxy-managed)--> [Host Proxy (sandboxd)]           |
|         --> Checks service row exists (TRUE), skips domain verification      |
|         --> Injects REAL global API key in cleartext --> [attacker.example]  |
+------------------------------------------------------------------------------+

Anatomy of a Silent Kit Update and Network Allowlist Hijack

Because ~/.config/sbx/credentials.yaml persisted independently of individual microVM lifecycles and lacked cryptographic digest pinning, source tracking, or kit-name scoping, an approval granted once transferred silently to future versions—or entirely different third-party kits requesting the same service name.

An attacker executing this version-swap sequence did not need shell access to the developer laptop:

  1. Benign Onboarding (t0): A maintainer publishes an open-source helper kit (v1) whose inject block points strictly to api.anthropic.com. The developer reviews the truthful consent screen and clicks accept.
  2. One-Line Manifest Tampering: The maintainer pushes v2 to the same Git tag or OCI registry reference, swapping api.anthropic.com for an external collector endpoint and adding that same collector hostname to permissions.network.allow.
  3. Zero-Prompt Egress and Cleartext Leakage (t1): When the developer starts a fresh sandbox with sbx create, sandboxd matches the existing anthropic entry in credentials.yaml and skips any confirmation dialog. Because permissions.network.allow entries from kits apply automatically without prompting, the attacker opens an outbound network route and forces the host proxy to inject the authentic credential into plain HTTP or TLS requests destined for the rogue server.
  4. Blind Policy Telemetry: Local proxy logs mark the outbound request simply as allowed, recording zero indication that a sensitive credential header was substituted onto the wire.

Blast Radius Across Thirteen Built-In AI and Git Services

Thirteen built-in credential integrations shared the vulnerable proxy substitution path inside Docker Sandboxes across macOS, Windows, and Linux: anthropic, copilot, cursor, devin, droid, github, google, groq, mistral, nebius, openai, openrouter, and xai. Although Endor Labs demonstrated the proof-of-concept exclusively against anthropic using a loopback canary server (localtest.me) and a synthetic token, all twelve peer services inherit the identical binding lookup mechanism.

Compounding the exposure, sbx secret set stores API keys globally by default unless restricted with --sandbox <SANDBOX_NAME>. A single hijacked kit update therefore compromises the shared master token reused by every local agent container on the workstation. Exfiltrated OpenAI, Anthropic, Google, or OpenRouter keys enable immediate quota theft and cloud billing abuse, while leaked GitHub personal access tokens typically carry repository write permissions capable of poisoning source trees and CI/CD pipelines. Note that Docker's separate cloud-hosted sandbox product maintains an independent credential store and was not shown to share this local sandboxd code path.

Patching to Version 0.55.0 and Auditing Exposed Credentials

Docker remediated CVE-2026-136998 in v0.55.0 (github.com/docker/sbx-releases/releases/tag/v0.55.0) by enforcing exact approved destination domains separately for API keys and OAuth grants, treating any credential binding without approved destinations as invalid. Before upgrading, engineers relying on legacy environment variables must migrate overrides explicitly because v0.55.0 stops reading older DOCKER_SANDBOXES_* variables (DOCKER_SANDBOXES_KIT_REQUIRE_SIGNATURE, DOCKER_SANDBOXES_KIT_TRUSTED_SIGNERS, DOCKER_SANDBOXES_KIT_ALLOWED_SOURCES, and DOCKER_SANDBOXES_KIT_ALLOW_LOCAL).

# 1. Persist signature and source verification settings before upgrading to v0.55.0+
sbx settings set kit.requireSignature true
sbx settings set kit.allowLocalKits false
sbx settings set kit.allowedSources "docker.io/verified-org/*"

# 2. Audit stored placeholders, bindings, and active sandbox scopes
sbx secret ls
cat ~/.config/sbx/credentials.yaml

# 3. Scope custom or provider tokens tightly to named sandboxes rather than global state
sbx secret set anthropic --sandbox repo-audit-01 --token "$ANTHROPIC_SCOPED_KEY"
sbx secret set-custom --placeholder PROXY_CUSTOM --header X-Custom-Key --sandbox repo-audit-01

Teams that ran third-party kits on v0.43.0 through v0.54.x should immediately revoke and rotate all API keys for all thirteen supported model providers alongside any developer GitHub tokens, then verify sbx version confirms 0.55.0 or newer across developer laptops.

Containing Agent Egress With WireGuard and VPNRice

Application-level consent prompts remain fragile whenever third-party manifests can mutate network allowlists or alter TLS destinations on update. Enforcing deterministic Layer 3 network containment outside the sandbox runtime prevents rogue endpoints from receiving traffic even when an agent framework suffers a proxy authorization bug.

Routing engineering workstations and self-hosted AI build runners through a WireGuard tunnel paired with VPNRice and RiceGuard establishes defense in depth beneath sandboxd:

  • Egress Allowlisting at Host Firewall Boundaries: Bind workstation outbound traffic over the wg0 WireGuard interface with kernel nftables rules allowing port 443 exclusively toward verified IP/CIDR ranges of legitimate AI providers while dropping arbitrary HTTP egress on non-standard ports (80, 8080, 8899) where cleartext header substitution can occur.
  • Blocking Unapproved Exfiltration Domains via RiceGuard DNS: Enabling RiceGuard DNS filtering inspects domain lookups originating from host proxies and microVM resolvers, intercepting newly registered exfiltration domains, dynamic DNS mirrors, and malicious webhook collectors before a TCP handshake completes.
  • Protecting Developer API Sessions on Untrusted Networks: When remote engineers run coding agents from cafés, airport lounges, or coworking hubs, WireGuard ChaCha20-Poly1305 authenticated encryption shields upstream API calls, Git pushes, and registry pulls from local LAN sniffing and ARP interception.
# Verify WireGuard tunnel state and drop unauthorized cleartext host-proxy egress on Linux
wg show all | grep -E "interface|endpoint|latest handshake"
nft add rule inet filter output oifname "wg0" tcp dport { 80, 8080, 8899 } counter reject with tcp reset

Combining patched Docker Sandboxes v0.55.0+, cryptographic kit signature policies, sandbox-scoped keys, and strict WireGuard egress containment prevents a single third-party kit update from turning local coding agents into silent secret-exfiltration channels. Strengthen encrypted workstation routing and malicious-domain DNS protection with Get VPNRice.