A recently discovered flaw in Docker Sandboxes has raised significant security concerns for developers using AI coding agents. This vulnerability allowed third-party agent kits to access sensitive API keys, compromising the security these sandboxes are designed to protect.
Understanding the Security Breach
This flaw, identified by Endor Labs researcher Peyton Kennedy, involved a mechanism where once a developer approved an agent kit, subsequent updates could transmit real API keys—such as those for Anthropic, OpenAI, or GitHub—to an attacker-controlled server without further user prompts. The flaw, tracked as CVE-2026-136998, has been addressed in the latest Docker version 0.55.0.
In a controlled demonstration, Kennedy showcased how a dummy key could be extracted and sent to a test server. Fortunately, there have been no reported attacks exploiting this vulnerability to date. The sandbox’s design intended for raw keys to remain inaccessible within the virtual environment, but this promise was undermined by the flaw.
Technical Details of the Flaw
Since version 0.43.0, Docker’s system approved credential requests by writing a binding that documented the service and domains authorized by the developer. However, the flaw was in the system’s failure to verify these recorded domains when processing requests. Instead, it merely checked for the existence of a service name binding, allowing unauthorized domain access.
In practical terms, a kit initially approved to access a specific domain could be altered to redirect keys to a different, unauthorized domain without alerting the developer. This oversight persisted even after the sandbox was deleted, and the connection logs misleadingly indicated allowed connections without specifying key involvement.
Impact and Mitigation Strategies
The vulnerability impacted all versions prior to 0.55.0 across macOS, Windows, and Linux platforms. Key-injection paths affected various integrations, including prominent ones like Anthropic and Google. Kennedy initially rated the flaw as high-risk under CVSS 3.1, later adjusting based on attack vectors.
To mitigate risks, developers are urged to upgrade to version 0.55.0, which enforces stricter credential injection policies. Additionally, reviewing approval files and adjusting key storage practices can bolster security. Kennedy also advised Docker to enhance approval bindings and improve policy logs to better track key injections.
In conclusion, this incident underscores the importance of vigilant security practices in software development environments. Developers must remain proactive in updating their systems and reviewing security configurations to protect against potential threats.
