Approved Once, Exfiltrated Later: Docker Sandboxes Credential-Binding Failure

Authors: Cloud Security Alliance AI Safety Initiative
Published: 2026-12-02

Categories: AI Agent Security
Download PDF
Download Markdown

Approved Once, Exfiltrated Later: Docker Sandboxes Credential-Binding Failure

Key Takeaways

CVE-2026-136998 is an authorization flaw in Docker Sandboxes, Docker’s microVM-based runtime for AI coding agents, that allowed a modified third-party “agent kit” to redirect a developer’s stored provider API key to an attacker-controlled host after the developer had approved the kit’s credential use once [1][4]. Docker Sandboxes versions from 0.43.0 up to (but not including) 0.55.0 recorded the destinations a user approved for each credential but did not consult that record when the host proxy substituted real keys into outbound requests; Docker fixed the issue in version 0.55.0, released November 30, 2026 [2][3][4]. The defect was discovered and reported by Peyton Kennedy of Endor Labs on September 21, 2026, and is classified as CWE-863 (Incorrect Authorization) [1][4].

The practical consequence is that a consent prompt that appeared to bind a key to a specific domain such as api.anthropic.com in fact bound it only to a service name. An attacker who controlled a kit reference (a tag, branch, or directory) could publish a benign version, wait for approval, and then ship an update whose only change was the injection domain, with no new prompt, warning, or diff shown at the next sbx create [1]. According to the researcher, thirteen built-in services share the affected injection path, including Anthropic, OpenAI, GitHub, and Google, although only the Anthropic path was tested directly [1][5].

Security teams should note three points. First, the issue leaves a thin forensic trail: the sandbox policy log recorded the attacker-bound connection as allowed without indicating that a credential had been injected [1][5]. Second, published severity scores diverge: under CVSS 4.0, Docker scores the issue 5.6 and the researcher 6.9, and the researcher’s CVSS 3.1 score of 8.2 High is the figure most trade press has repeated, so organizations should score against their own exposure to third-party kits [1][4][5]. Third, no source reviewed for this note reports exploitation in the wild, but the researcher’s write-up includes complete reproduction steps, which lowers the barrier to replication against unpatched installations [1][6]. Organizations running Docker Sandboxes should upgrade to 0.55.0, audit existing credential bindings, and rotate any provider key that was exposed to a third-party kit whose contents changed after approval.

Background

Docker Sandboxes runs AI coding agents inside lightweight microVMs and is controlled through the sbx command-line tool and the sandboxd host daemon [1][7]. A central design goal of the product is that the agent inside the sandbox never holds the developer’s real provider credentials. Instead, the developer stores a key on the host with sbx secret set, the agent sends a placeholder value (for example, an x-api-key: proxy-managed header), and a host-side proxy swaps in the real key as the request leaves the sandbox, but only for destinations the developer has approved [1][7]. Credential substitution at an egress proxy is a widely recommended pattern, because it keeps long-lived secrets out of an environment that may be processing untrusted repositories and prompt-injected content.

Agent behavior in Docker Sandboxes is packaged as “kits,” which Endor Labs describes as packaged agent configurations [1]. Built-in agents ship with Docker-maintained kits, while third-party kits are fetched by reference and can declare that they need credentials for the same built-in services. A kit’s inject block lists, per service, the domains at which the proxy should substitute the stored credential, and a separate permissions.network.allow section declares the egress destinations the sandbox may reach [1].

Version 0.43.0 introduced a credential consent gate to govern this relationship. When a kit requests a credential, an interactive sbx create displays each requested service and its destination domains, and the prompt defaults to declining [1]. Approval writes a binding to ~/.config/sbx/credentials.yaml that records the service and its approved domains, for example anthropic: apiKey: domains: [api.anthropic.com] [1]. Docker Sandboxes has received other security fixes during 2026, including a workspace file-access bypass also disclosed by Endor Labs (CVE-2026-103916) that was fixed in version 0.51.0 [8]. CVE-2026-136998 therefore sits in a sequence of fixes to the sandbox’s host/guest trust boundary more broadly, and it was introduced in the same release that added the consent mechanism it undermines [1].

Security Analysis

The Binding That Was Written but Never Read

The core of the vulnerability is a gap between what the consent prompt told the user and what the runtime enforced. According to Endor Labs, the domains list stored in each binding “is written and never read” [1]. At request time, the proxy performed a yes-or-no lookup on the service name alone: if any binding row existed for anthropic, the proxy injected the real key at whatever domains the currently loaded kit declared. The researcher also observed a function named MissingDomainsForService in the shipped binary that did not appear to gate the runtime substitution path, suggesting that domain enforcement had been designed but not wired in [1]. Docker’s release notes for 0.55.0 confirm the substance of the finding, stating that a modified third-party kit “could reuse a previously approved service binding to send a stored provider credential to an attacker-controlled host,” and that credential injection “now enforces the approved destinations for API keys and OAuth tokens” [2].

A second, compounding weakness is that the binding was not tied to the identity of the kit that earned it. It recorded neither the kit’s name, content digest, nor source, so an approval granted to one version of a kit carried forward to later versions fetched from the same reference [1]. The researcher notes that the same structure would in principle let a different kit declaring the same service inherit the approval, although that cross-kit case was not demonstrated [1]. Endor Labs further reports that bindings survived sbx rm, meaning that removing a sandbox did not revoke the consent associated with it [1].

Attack Sequence

The attack described by Endor Labs requires no exploitation of memory safety or isolation primitives; it relies entirely on the mutability of a kit reference and the unbound approval. The table below summarizes the sequence.

Step Attacker action What the developer sees Runtime effect (0.43.0 to before 0.55.0)
1 Publishes kit v1 that injects the Anthropic key only at api.anthropic.com Consent prompt listing api.anthropic.com None until approved
2 Waits for the developer to approve Developer approves Binding written to credentials.yaml with service and domains
3 Pushes kit v2 to the same tag, branch, or directory, changing only the inject domain and adding the attacker host to permissions.network.allow Nothing at next sbx create: no prompt, warning, or diff [1] Network allow entries applied without a prompt
4 Agent makes a request carrying the placeholder header Normal agent operation Proxy finds a binding for the service name and injects the real key at the attacker’s host
5 Attacker host receives the key sbx policy log shows an allowed connection, with no record of credential injection Key is exfiltrated

Kennedy reproduced the sequence on macOS 15.6 (arm64) using a dummy key and a local canary HTTP server, which received the X-Api-Key header in cleartext over plain HTTP [1]. The researcher also showed that manually rewriting a binding’s domains to a nonexistent host produced the same leak, which is direct evidence that the stored domains played no role in enforcement [1]. Docker’s 0.55.0 release separately introduced a breaking change restricting host-credential substitution to HTTPS requests [2]. Although that change blocks the plain-HTTP delivery path used in the demonstration, an attacker-controlled host can trivially serve HTTPS, so the restriction does not by itself mitigate the vulnerability; destination enforcement is the substantive fix.

What Held and What Did Not

The researcher was careful to document controls that continued to work, and this context matters for scoping the risk. Mixins could not add injection domains for built-in services, kits could not impersonate built-in agents, sbx kit add refused credential-declaring kits, and non-interactive sbx create invocations declined credential requests by default, with no --yes flag to bypass the prompt [1]. The exposure therefore depended on a developer interactively approving a third-party kit at least once and later re-running a kit from a mutable reference controlled by someone else. That is a narrower precondition than “any Docker Sandboxes user,” but it is precisely the workflow that third-party kit distribution is designed to support.

The thirteen built-in services that Endor Labs identifies as sharing the injection path are Anthropic, Copilot, Cursor, Devin, Droid, GitHub, Google, Groq, Mistral, Nebius, OpenAI, OpenRouter, and xAI [1]. Because keys are stored globally by default rather than per sandbox, a single approved binding could expose a key that the developer also relies on for unrelated work [1]. The blast radius of a stolen provider key can extend beyond direct billing abuse. Depending on how a key is scoped, a stolen AI provider key may allow access to organization-level resources such as uploaded files or fine-tuning jobs, as well as billable usage attributed to the victim organization. Endor Labs notes that a stolen GitHub token grants write access to the victim’s repositories, which can in turn expose source code and CI/CD configuration [1].

Severity and Source Discrepancies

Published scoring for this CVE varies more than usual, and readers comparing advisories should understand why. The divergence centers on whether the vulnerability is treated as changing scope, that is, whether compromise of the sandbox’s credential channel affects systems beyond the sandbox itself.

Source Scoring system Score Vector (abbreviated)
Docker (CVE record, as CNA) [4] CVSS 4.0 5.6 Medium AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/…/SC:N/SI:N/SA:N
Endor Labs [1] CVSS 4.0 6.9 Medium AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/…/SC:H/SI:H/SA:N
Endor Labs [1] CVSS 3.1 8.2 High AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

Endor Labs reports that it initially scored the issue with a network attack vector at 9.3 Critical before revising to a local vector [1]. Trade press coverage has largely repeated the 8.2 figure [5], while one vendor analysis describes the issue as high severity while citing the 5.6 score [6]. CSA’s assessment is that the subsequent-system impact recorded in the researcher’s vector better reflects the practical risk, since the stolen asset is a credential for an external service rather than data inside the sandbox; organizations should nonetheless treat the published numbers as a starting point and weight them by their own use of third-party kits. Secondary sources also differ on peripheral details: one vendor summary states that all versions before 0.55.0 are affected across macOS, Windows, and Linux [6], whereas the CVE record limits the range to 0.43.0 onward (while listing macOS, Linux, and Windows as affected platforms) and the researcher confirmed the behavior only on macOS [1][4]. This note follows the CVE record and the primary research.

Exploitation Status

No source reviewed for this note reports in-the-wild exploitation; one vendor analysis states that no confirmed real-world credential theft had been reported as of disclosure [6]. That absence should be read cautiously. The researcher’s post publishes step-by-step reproduction details [1], and the weak logging described above means that successful exploitation before the fix may not have produced evidence that a defender would recognize. Absence of reports is therefore weaker evidence of absence than it would be for a flaw with a distinctive network or host signature.

Recommendations

Immediate Actions

Organizations should upgrade every installation of Docker Sandboxes to version 0.55.0 or later, which enforces approved destinations at substitution time and treats bindings without approved destinations as missing [2][3]. The same release separately restricts host-credential substitution to HTTPS [2]. Because that HTTPS-only change is breaking, teams should test agent workflows that relied on plain-HTTP endpoints before broad rollout, but they should not defer the upgrade on that basis.

In parallel, security teams should inventory ~/.config/sbx/credentials.yaml on developer machines and remove bindings associated with third-party kits that have not been re-reviewed [1]. Any provider key (Anthropic, OpenAI, GitHub, Google, or the other built-in services) that was approved for a third-party kit whose content could have changed after approval should be rotated, and provider-side usage logs for those keys should be reviewed for requests from unexpected sources or unusual volume. Because the sandbox policy log did not record credential injection [1][5], provider-side telemetry is likely to be the most reliable retrospective signal available.

Short-Term Mitigations

Over the following weeks, teams should eliminate mutable kit references from developer workflows. Pinning third-party kits to a specific commit, or maintaining an internally reviewed local copy, prevents the demonstrated version-swap attack, because the approved content can no longer change underneath the binding [1][5]. Where the tooling supports it, keys should be scoped per sandbox using sbx secret set --sandbox rather than stored globally, so that a binding compromise exposes only the key provisioned for that sandbox [1].

Each sbx create that loads a third-party kit should be treated as a change event: reviewers should check the kit’s inject domains and its permissions.network.allow entries against the previously approved version [1]. Organizations whose enterprise egress proxies perform TLS inspection can add a defense-in-depth layer by alerting on provider-style authentication headers (for example, x-api-key or Authorization: Bearer sk-… patterns) sent to destinations other than the provider’s known API domains. This control depends on decryption, because after 0.55.0 all credential-bearing requests leave the sandbox over HTTPS. Where TLS inspection is not in place, a weaker but still useful signal is to alert on developer-host connections to newly registered or uncategorized domains that coincide with agent sessions. Finally, issuing provider keys dedicated to agent use, with tight spending limits and the narrowest available scopes, limits the value of any single stolen credential.

Strategic Considerations

The broader lesson of CVE-2026-136998, captured in the researcher’s observation that “a prompt is only as strong as what its answer is bound to” [1], applies well beyond Docker. Human-in-the-loop consent is only meaningful when the runtime enforces exactly what the human approved and re-prompts when the approved object changes. Organizations evaluating agent runtimes, IDE assistants, and MCP hosts should ask vendors directly whether approvals are bound to a content digest of the requesting component, whether the approved parameters (destinations, paths, scopes) are enforced at the point of use, and whether the enforcement decision is logged in a form a defender can query. Endor Labs recommended all three properties to Docker—destination enforcement, digest binding, and injection logging—and the 0.55.0 release notes confirm the first [1][2].

Agent kits, skills, plugins, and MCP server configurations also deserve the same supply-chain controls that organizations already apply to packages and container images: provenance verification, pinning, review of diffs between versions, and an internal allowlist of approved sources. Treating an agent configuration as executable, security-relevant code, rather than as preference data, is likely to become a baseline expectation as third-party ecosystems for agent tooling grow.

CSA Resource Alignment

CVE-2026-136998 is the latest instance of a pattern that CSA has documented repeatedly in 2026: an approval or isolation control that appears to bind an AI agent’s action, but whose answer is not tied to the object the runtime actually acts on. CSA’s rapid research note GhostApproval: A Trust Boundary Gap in Six AI Coding Agents [9] analyzed symlink confusion that caused coding-agent confirmation dialogs to display a benign filename while the action resolved to a sensitive system path. The Docker flaw is the credential analog of that failure: the consent prompt displayed a correct destination, but the approval was recorded against a coarser identifier, so the human reviewer approved something narrower than what the runtime later permitted. Both cases support the GhostApproval note’s conclusion that human-in-the-loop review must be paired with runtime enforcement of the approved parameters.

CSA’s note When Sandboxes Aren’t: Agentic AI Boundary Failures [10] argued that “sandboxed” is a claim that must be verified against the capabilities a system actually exposes, observing that permissions granted for one purpose often remain usable for another. The Docker binding gap is a precise example: the stored domain list described a scope that the system never enforced. Similarly, AI Coding Agent Sandbox Escapes: The Trust Handoff Flaw [11] showed that coding-agent sandbox failures tend to occur at the handoff to a trusted component outside the sandbox rather than in the isolation primitive itself. In Docker Sandboxes, the attack did not require defeating the microVM; the failure occurred in the trusted host-side proxy that consumed attacker-influenced kit configuration.

At the framework level, the AI Controls Matrix (AICM) v1.1 [12] provides the control vocabulary for remediation. Its Identity and Access Management domain addresses least-privilege credential scoping and the binding of authorization decisions to verified identities, which maps to digest-bound approvals and per-sandbox keys. Its Threat and Vulnerability Management and Application and Interface Security domains cover patch management and secure handling of third-party components, and its Logging and Monitoring domain speaks to the injection-visibility gap. Teams threat-modeling agent runtimes can use MAESTRO [13] to place this issue at the boundary between the agent ecosystem layer (third-party kits) and the deployment and infrastructure layer (the credential proxy), where cross-layer trust assumptions are most likely to fail.

References

[1] Kennedy, Peyton (Endor Labs). “CVE-2026-136998: Docker Sandboxes Vulnerability Allows Malicious AI Agent Kits to Steal Developers’ API Keys.” Endor Labs, November 30, 2026.

[2] Docker. “Docker Sandboxes Release Notes.” Docker Documentation, version 0.55.0 entry dated November 30, 2026, accessed December 2, 2026.

[3] Docker. “sbx-releases v0.55.0.” GitHub, November 30, 2026.

[4] Docker (CNA). “CVE-2026-136998.” CVE Program, December 1, 2026. Also available via NIST’s National Vulnerability Database.

[5] Sharma, Shweta. “Docker flaw lets Anthropic, OpenAI, GitHub keys slip past sandboxes.” CSO Online, December 2, 2026.

[6] Aviatrix. “Silent Key Theft: How a Single AI Agent Kit Update Bypassed Docker Sandboxes’ Credential Guardrails.” Aviatrix Threat Research Center, December 1, 2026.

[7] Docker. “Docker Sandboxes: Credentials.” Docker Documentation, accessed December 2, 2026.

[8] Endor Labs. “Docker Sandboxes Vulnerability Lets AI Agents Access Sensitive Files Outside Their Sandbox (CVE-2026-103916).” Endor Labs, November 3, 2026.

[9] Cloud Security Alliance. “GhostApproval: A Trust Boundary Gap in Six AI Coding Agents.” CSA AI Safety Initiative, July 15, 2026.

[10] Cloud Security Alliance. “When Sandboxes Aren’t: Agentic AI Boundary Failures.” CSA AI Safety Initiative, 2026.

[11] Cloud Security Alliance. “AI Coding Agent Sandbox Escapes: The Trust Handoff Flaw.” CSA AI Safety Initiative, July 22, 2026.

[12] Cloud Security Alliance. “AI Controls Matrix (AICM) v1.1.” Cloud Security Alliance, 2025.

[13] Huang, Ken (Cloud Security Alliance). “Agentic AI Threat Modeling Framework: MAESTRO.” Cloud Security Alliance, February 6, 2025.

← Back to Research Index