December 2, 2026

Critical Security Flaw in Docker Sandboxes Exposed API Keys to Third-Party Agent Kits

In an era where artificial intelligence coding agents are becoming increasingly integrated into the software development lifecycle, the security of the environments that host these agents has become a paramount concern. Docker, a leader in containerization and virtualization technology, recently moved to address a significant security vulnerability in its Docker Sandboxes product. The flaw, identified as CVE-2026-136998, created a pathway for malicious third-party agent kits to exfiltrate highly sensitive API keys, including those for OpenAI, Anthropic, and GitHub, which the sandbox was specifically designed to protect.

Docker Sandboxes were engineered to provide an isolated virtual machine (VM) environment where AI-driven coding agents could operate without posing a risk to the developer’s host system. By running these agents inside a hardened VM, Docker aimed to allow developers to leverage the power of LLM-based automation while maintaining a strict boundary between untrusted code and the developer’s primary workspace. However, research conducted by Peyton Kennedy of Endor Labs revealed that a flaw in the product’s authorization logic effectively neutralized this boundary for sensitive credentials.

The vulnerability stems from a breakdown in how Docker Sandboxes manage and validate the destinations for API requests. At the heart of the product’s security model is a promise of credential isolation: raw API keys are never supposed to enter the sandbox itself. Instead, a developer stores their secrets on the host machine using a specific command, such as "sbx secret set." When an agent operating within the virtual machine needs to make an external request—for instance, to an LLM provider—it uses a placeholder header. A specialized proxy residing on the host machine is then responsible for intercepting that request and swapping the placeholder with the actual, sensitive API key before the request leaves the host for the internet.

This mechanism is designed to ensure that even if an AI agent is compromised or behaves maliciously, it never has direct access to the developer’s underlying credentials. The decision of which external domains are permitted to receive these injected keys is governed by the "kit," a packaged configuration that defines the agent’s behavior and requirements. These kits can be fetched from a registry, a Git repository, or a local directory.

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

The security failure began with the introduction of a new consent system in version 0.43.0, released in mid-September. This system was intended to give developers more granular control by requiring them to approve a kit’s request for credentials. Upon approval, the system was supposed to create a "binding" that recorded both the service being accessed and the specific domains the developer had authorized.

However, Kennedy’s technical analysis discovered that while the system recorded these approved domains, it failed to actually consult that list when a request was being processed. When the host-side proxy received a request from the sandbox, it only checked whether a binding existed for the service name. If a binding was found, the proxy would proceed to inject the real API key and forward it to whatever domain the current version of the kit specified, regardless of whether that domain had been part of the developer’s original approval.