Docker Sandboxes Vulnerability Allows AI Agents to Steal API Keys
A critical flaw in Docker Sandboxes (CVE-2026-136998) could permit malicious AI agents to reuse approved credentials, potentially stealing API keys for OpenAI, Claude, and GitHub.

Docker has addressed a significant security vulnerability within its Docker Sandboxes feature that posed a risk to sensitive developer credentials. The flaw, identified as CVE-2026-136998, allowed malicious AI agents, often integrated as "kits," to reuse previously granted approvals for credentials without requiring a fresh prompt from the developer. This could lead to the unauthorized exfiltration of API keys for popular services such as OpenAI and Anthropic's Claude, as well as access tokens for GitHub.
The vulnerability was introduced in version v0.43.0 of Docker Sandboxes, a release that had initially aimed to enhance security by implementing a consent prompt for third-party kits requesting access to credentials. However, the mechanism for remembering developer approvals was found to be flawed. Instead of approving access on a per-request or per-destination basis, Docker Sandboxes remembered approvals at the service level. This meant that once a developer approved a credential for a specific service, a subsequent, potentially malicious, version of an agent kit could reuse that approval to send the credential to a new, untrusted destination without further user interaction.
Endor Labs, the security firm that reported the issue to Docker on September 21, 2026, successfully demonstrated the flaw using a dummy Anthropic key. Their analysis revealed that while the policy log indicated an allowed connection, it failed to record that the credential itself had been transmitted to the new destination. The researchers identified that at least 12 other built-in services, including OpenAI and GitHub, utilize a similar credential handling process, suggesting a broader potential impact.
The severity of CVE-2026-136998 was rated 8.2 (High) under the CVSS 3.1 scoring system and 6.9 (Medium) under CVSS 4.0. The potential consequences of exploitation include the theft of API keys, enabling unauthorized usage of cloud services, or the compromise of code repositories if write-access tokens for platforms like GitHub were stolen. Unlike some previous security incidents involving Docker, this vulnerability did not involve an escape from the sandbox environment itself; the virtual machine remained isolated. The issue was specifically related to the credential management proxy handling within Docker Sandboxes.
Docker has since released version v0.55.0 of Docker Sandboxes on November 30, 2026, which includes the fix for this vulnerability. Endor Labs confirmed the patch in their advisory. To mitigate risks, developers are strongly advised to update their Docker Sandboxes to version v0.55.0 or a later release. Furthermore, it is crucial to review all existing credential approvals for third-party kits. If any approved kit has been unexpectedly modified or if suspicious activity is detected, affected keys should be rotated immediately, and associated provider usage and GitHub activity should be scrutinized for any anomalies.
To further enhance security, users should adopt best practices such as limiting credentials strictly to the sandboxes that require them. Employing fixed, reviewed versions of third-party kits, rather than dynamic branches or tags that can be altered, is also recommended. This proactive approach helps prevent the reuse of compromised credentials and limits the potential attack surface for AI-driven development tools.