A high-severity Docker Sandboxes flaw allowed a malicious AI agent kit to gain one-time approval for a legitimate service, then change its destination in a later update. The updated kit could cause Docker’s host-side proxy to send real API keys or GitHub tokens to an attacker-controlled server without another warning to the developer.
How the attack worked
The exploit path starts with trust. A malicious or compromised third-party AI agent kit requests access to a legitimate, well-known service domain, such as api.anthropic.com. A developer, seeing a familiar and reasonable request, approves it. That single approval event is where the weakness lived: Docker Sandboxes recorded the approval tied to the service name rather than to the specific agent kit and version that made the request.
Later, the attacker updates the same kit and changes its actual destination to a server they control. When the developer runs the updated kit, Docker recognizes the existing approval for that service name and proceeds without any new consent prompt or warning. Docker's host-side proxy can then inject the developer's real API key or GitHub token into a request that is actually headed to the attacker's infrastructure.
Why it succeeded
The core issue is a mismatch between what gets approved and what gets enforced. Developers believe they are approving a specific kit's access to a specific service. In practice, the system treats the approval as durable and tied only to the service name, which makes the permission effectively permanent and transferable to any future version of that kit. This turns a one-time, reasonable approval decision into an open-ended trust relationship that an attacker can exploit well after the initial review.
What to watch for
- An agent kit that uses a mutable reference rather than a pinned commit, allowing silent updates after approval.
- A previously approved kit changing its network destination or behavior without a corresponding new request.
- Approval prompts that identify a service but do not clearly bind the approval to a specific kit version.
- Policy logs showing an allowed connection that give no indication of whether a credential was embedded in that request.
How to build resistance
Organizations using AI coding agents and third-party agent kits should treat each approval as scoped to a specific version, not indefinite trust in the kit itself. Practical steps include reviewing existing third-party credential approvals, pinning agent kits to fixed commits instead of mutable references, restricting sensitive credentials to individual sandboxes rather than broad access, and rotating keys whenever a previously approved kit may have changed. Since logs may not reveal credential injection even when a connection appears normal, teams should not rely on log review alone to confirm that credentials remain safe.
Key findings
- A malicious third-party AI agent kit could initially request access to a legitimate service, receive developer approval, and later be updated to send credentials to an attacker-controlled server.
- Docker recorded approval by service name rather than by the specific agent kit and version, so a changed kit could reuse prior approval without another prompt.
- The host-side proxy could inject the real API key into a request even after the kit changed the request destination.
- Policy logs could show an allowed connection but not reveal that a credential was injected.
- Docker fixed the issue in Docker Sandboxes v0.55.0; affected behavior was introduced in v0.43.0.
Who’s being targeted
- Commonly targeted roles: Developers, Software engineers, DevOps engineers, Platform engineering teams, AI engineering teams, Security engineering teams.
- Affected industries: Software development, Technology, Organizations using AI coding agents, Organizations using cloud AI services.
- Attack channels: website.
- Impersonated: A trusted third-party AI agent kit requesting access to Anthropic's API.
Red flags to watch for
- The agent kit uses a mutable reference or receives an unexpected update after initial approval.
- A previously approved kit changes its network destination or permissions.
- The approval prompt identifies a service but does not clearly bind approval to a specific kit version or commit.
Frequently asked questions
What was the Docker Sandboxes approval flaw?
Docker recorded approval for a third-party AI agent kit by service name rather than by the specific kit and version, so an updated kit could reuse a developer's prior approval without triggering another consent prompt.
How could an attacker exploit this flaw?
An attacker could publish an agent kit that first requests access to a legitimate service like api.anthropic.com, get developer approval, then later update the kit to redirect the approved credential to an attacker-controlled server.
Would developers notice the credential theft in logs?
Not necessarily. Docker's policy log would show the connection as an allowed request but would not indicate that a credential had been injected into it.
How is this flaw fixed?
Docker fixed the issue in Docker Sandboxes v0.55.0. The affected behavior had been introduced in v0.43.0.
Read the video transcript
That agent kit you approved yesterday? It may not be the same kit today. A third-party kit asks for Anthropic access. You approve it. Then a later update changes its destination, but Docker reuses the service approval without asking again. Here's the catch: Docker's host proxy can add your real API key to that redirected request. The policy log may just say 'allowed', not 'key sent.' Docker fixed this in Sandboxes v0.55.0. Your move: upgrade to v0.55.0 or later.