Critical Docker Sandboxes Vulnerability Allowed Third-Party AI Kits to Exfiltrate API Keys

A recently patched security flaw in Docker Sandboxes—a product designed to run AI coding agents safely inside isolated virtual machines—could have allowed third-party agent kits to surreptitiously steal sensitive API keys that the platform was explicitly engineered to keep out of reach. Discovered by Endor Labs researcher Peyton Kennedy, the vulnerability exposed a systemic flaw in how credential authorizations were handled, enabling a malicious or compromised kit update to siphon real credentials belonging to major developer services straight to an attacker-controlled server without triggering any secondary prompts or warnings.

Docker moved swiftly to address the security issue, releasing version 0.55.0 of the software to patch the flaw, which has been officially tracked as CVE-2026-136998. Kennedy successfully demonstrated the exploit using a dummy key paired with a test server operating locally on his machine. Fortunately, security analysts and vendors report that no active exploitation or malicious attacks leveraging this specific vulnerability have been observed in the wild prior to the patch.

The core promise of Docker Sandboxes centers around isolating raw secrets from the experimental or autonomous code executed by AI agents. Under normal operating conditions, a developer securely stores an API key on their host machine using the sbx secret set command. When an AI agent operating inside the virtual machine needs to interact with external services, it sends requests containing only a placeholder header. A secure proxy running on the host intercepts this traffic and dynamically swaps in the actual, decrypted API key just as the request exits the environment.

Determining which destination domains are permitted to receive these real keys is ostensibly managed by the "kit"—a packaged agent configuration file fetched directly from a container registry, a Git repository reference, or a local directory. Following the introduction of a new consent system in version 0.43.0 on September 15, whenever a developer approved a kit’s credential request, the system was supposed to write a binding that recorded both the intended service and the specific web domains approved by the developer.

Docker Sandboxes Flaw Lets Malicious AI Agent Kit Updates Steal Developers' API Keys

However, Kennedy’s deep technical analysis revealed a critical oversight in the implementation: that recorded list of approved domains was never actually read back or validated during subsequent operations. At the precise moment a network request was made, the proxy’s validation check merely verified whether any binding existed for that specific service name. Once that superficial check passed, the proxy proceeded to forward the real API key to whatever domains were specified by the current, active version of the kit. As Kennedy noted in his technical findings, the specific domains originally reviewed and approved by the system operator played zero role in the actual authorization decision.

To prove the concept, Kennedy set up a test scenario where a kit was initially approved with a single legitimate destination—api.anthropic.com—as its sole authorized endpoint. He then replaced that kit at the exact same Git reference with a modified version that pointed instead to an attacker-controlled test server. When a new sandbox was subsequently created using the updated kit, the system generated no warning prompts or alerts. The host proxy seamlessly intercepted the traffic and delivered the sensitive key data directly to the test server in cleartext. Alarmingly, the initial trust approval even persisted after the affected sandbox was entirely deleted.

Compounding the security risk, the development environment offered no post-execution warnings to alert the developer that their credentials had been mishandled. The system’s internal policy log recorded the network connection simply as an allowed event, remaining entirely silent regarding the fact that a high-value API key had been dynamically injected into the outgoing traffic stream. Furthermore, Kennedy discovered that a malicious kit version could even add its own rogue server to the sandbox’s network allowlist entirely unprompted.

The vulnerability affected every version of the local product released prior to version 0.55.0 across macOS, Windows, and Linux operating systems, according to the official CVE record published by the vendor. Thirteen built-in integrations utilized this vulnerable key-injection path, encompassing major platforms such as Anthropic, OpenAI, GitHub, and Google. Kennedy specifically tested the flaw against the Anthropic integration using a simulated dummy value to verify the mechanics of the exploit.

Docker Sandboxes Flaw Lets Malicious AI Agent Kit Updates Steal Developers' API Keys

Initially, Kennedy evaluated the severity of the bug as a 9.3 Critical rating under the CVSS 3.1 framework. However, he subsequently adjusted the score to 8.2 High after carefully re-evaluating the attack vector. Because a successful exploit relies on a developer voluntarily fetching a malicious or modified kit file rather than an attacker remotely breaching a network service, the vector is fundamentally local. Under the newer CVSS 4.0 methodology, Kennedy assigned a score of 6.9, while the vendor rated it at 5.6, placing both metrics firmly in the Medium tier. The discrepancy between the scoring frameworks primarily hinged on differing interpretations of whether downstream harm to a developer’s third-party provider account should influence the base security score.

The attack mechanics rely entirely on a one-time social engineering or supply chain hurdle: once a developer provides an initial approval to a trusted-looking kit, a single altered line of code in a subsequent update is all an adversary needs. Crucially, the attacker does not require direct access to the developer’s local workstation. Other protective mechanisms within the sandbox architecture functioned as intended during testing—for instance, a rogue kit remained incapable of impersonating a built-in agent, and the consent prompt continued to default securely to a "decline" state.

The potential blast radius of the vulnerability was intrinsically tied to how Docker Sandboxes handles global credentials. Because secrets saved via sbx secret set are global by default across the local installation, any redirected API key impacted every single sandbox operating on that particular machine. For developers utilizing tools like GitHub, a stolen token typically carries broad privileges, including full write access to their personal and professional repositories, depending on the specific permission scopes granted to the token.

It is worth noting that the security audit focused exclusively on the local product edition. Cloud-based sandboxes maintain a completely separate secret storage architecture, and developers have confirmed whether those cloud environments ever shared the flawed authorization logic present in the local client.

Docker Sandboxes Flaw Lets Malicious AI Agent Kit Updates Steal Developers' API Keys

Upgrading the software to version 0.55.0 completely removes the vulnerability. According to the official release notes published by Docker, the updated version ensures that kit credential injection strictly enforces the specific domains approved for API keys separately from OAuth tokens, and explicitly treats any binding that lacks explicitly approved destinations as completely missing.

For development environments still operating on legacy versions, or for any users who previously granted credential permissions to third-party kits while their systems were vulnerable, security professionals advise exercising extreme caution, auditing active kit sources, and immediately rotating all exposed API tokens and credentials.

Reflecting on the nature of the flaw, Kennedy emphasized a fundamental security lesson regarding human-in-the-loop interfaces: a security prompt is only as robust as the underlying artifact its decision is bound to. If a user’s approval is not cryptographically or programmatically tied to the exact inspected artifact, subsequent software updates will blindly inherit that trust. This incident marked Kennedy’s second significant vulnerability discovery within Docker Sandboxes in a span of just a month, following a file-copy flaw reported on September 21 that previously allowed an AI agent to access host files outside of its designated sandbox folders, which was subsequently patched by the vendor on November 3. In both instances, while the core virtual machine isolation boundary successfully held firm, the systemic security failures resided entirely within the authorization logic governing developer approvals.