Docker Sandboxes Vulnerability Exposes Developers' AI API Keys to Theft

A security vulnerability in Docker Sandboxes could have allowed malicious updates to third-party AI agent kits to steal developers' API keys without requiring additional approval. The flaw affected the platform's credential-handling mechanism, potentially exposing credentials belonging to services such as Anthropic, OpenAI and GitHub.

The vulnerability, identified as CVE-2026-136998, was discovered by Endor Labs researcher Peyton Kennedy. Docker addressed the issue in Docker Sandboxes version 0.55.0, released on November 30, 2026.

Docker Sandboxes is designed to run AI coding agents inside isolated virtual machines, helping developers protect their host systems and sensitive credentials while using AI-powered development tools.

However, the vulnerability exposed a weakness in how the platform handled previously approved credentials when third-party agent kits received updates.

How the Vulnerability Worked

Docker Sandboxes uses a host-side proxy to protect API credentials. Developers store their actual keys on the host system, while AI agents inside the sandbox use placeholder credentials. The proxy then injects the real key when an authorised request is sent to an approved service.

The security issue involved how Docker remembered and reused developer approvals.

When a developer initially approved a third-party agent kit's request to access a service, Docker recorded the approved destination domains. However, subsequent requests checked whether approval existed for the service rather than verifying whether the current destination matched the originally approved domain.

This created an opportunity for a malicious kit update to change the destination without triggering another approval request.

For example, a developer could initially approve a kit to send requests to an official Anthropic API domain. If a later update redirected those requests to an attacker-controlled server, the proxy could still inject the developer's actual API key.

The updated kit could therefore receive sensitive credentials without the developer being asked to approve the new destination.

Anthropic, OpenAI and GitHub Credentials Among Those at Risk

The vulnerability affected 13 built-in integrations that share Docker's credential-injection mechanism.

These include services and integrations associated with:

  • Anthropic

  • OpenAI

  • GitHub

  • Google

  • Mistral

  • Groq

  • OpenRouter

  • xAI

The potential consequences depend on the permissions associated with the stolen credentials.

A compromised AI provider API key could allow unauthorised usage and unexpected charges. A stolen GitHub token could potentially provide access to repositories and other resources within the token's permission scope.

The vulnerability affected Docker Sandboxes versions from 0.43.0 up to, but not including, 0.55.0 across macOS, Windows and Linux.

Researcher Demonstrated the Flaw Using a Dummy API Key

Kennedy demonstrated the vulnerability by using a test agent kit and a dummy Anthropic API key.

In the demonstration, the researcher first approved a kit to communicate with an authorised API domain. The kit was subsequently modified to redirect its requests to a test server.

When the updated kit was launched again, Docker did not display a new approval prompt. Its proxy sent the dummy credential to the alternative destination.

The demonstration showed that previously granted approval could remain valid even when the destination changed.

According to the researcher, no attacks exploiting this vulnerability had been reported at the time of disclosure. The demonstration established the potential for credential theft rather than confirming that developers' real credentials had been stolen.

Docker Releases Security Fix in Version 0.55.0

Docker addressed the vulnerability by changing how credential approvals are enforced.

Version 0.55.0 ensures that credential injection respects the destinations approved for API keys and OAuth credentials separately. It also treats bindings without approved destinations as missing.

This prevents an updated third-party kit from simply reusing an earlier approval to redirect credentials to an unapproved domain.

Docker's fix addresses the underlying weakness in destination validation rather than requiring developers to stop using AI coding agents altogether.

What Developers Should Do to Protect Their Credentials

Developers using Docker Sandboxes should take immediate steps to review their installations and previously approved third-party agent kits.

Recommended actions include:

  1. Upgrade Docker Sandboxes: Install version 0.55.0 or later to receive the security fix.

  2. Review credential approvals: Check the credentials configuration file for previously approved third-party kits and remove unnecessary or suspicious approvals.

  3. Inspect agent kit updates: Review destination domains and network permissions whenever a third-party kit changes.

  4. Use pinned versions: Where supported, pin agent kits to reviewed Git commits instead of automatically accepting changing versions.

  5. Rotate potentially exposed keys: Replace API keys that may have been accessible to a third-party kit whose destination changed unexpectedly.

  6. Limit credential permissions: Use restricted tokens and avoid granting broader access than an agent requires.

Developers should also review their API provider and GitHub account activity for unfamiliar usage.

A Growing Security Challenge for AI Coding Agents

The incident highlights a broader security concern as AI coding agents become more integrated into software development environments.

Sandboxing can isolate an AI agent from parts of a developer's computer, but the security of the overall system also depends on how credentials, permissions, integrations and third-party updates are managed.

A trusted agent configuration can become a potential security risk if its permissions remain valid after its contents or destinations change.

For developers and organisations adopting AI-assisted coding tools, the incident reinforces the importance of reviewing third-party components, restricting credential access and treating software updates as part of the security boundary.

As AI agents gain access to more development tools and services, permission management and credential protection will remain critical to securing modern software development workflows.