AIFeed

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

Summary

A flaw in Docker Sandboxes, which runs AI coding agents inside isolated virtual machines, meant a third-party agent kit could steal the API keys the product is designed to keep out of the agent's reach. After one approval from the developer, a later update to that kit could send their real Anthropic, OpenAI, or GitHub key to a server the attacker controls, with no new prompt, Endor Labs

Original text(via The Hacker News)

A flaw in Docker Sandboxes, which runs AI coding agents inside isolated virtual machines, meant a third-party agent kit could steal the API keys the product is designed to keep out of the agent's reach.

After one approval from the developer, a later update to that kit could send their real Anthropic, OpenAI, or GitHub key to a server the attacker controls, with no new prompt, Endor Labs researcher Peyton Kennedy found. Docker fixed the flaw in version 0.55.0 yesterday.

He demonstrated the flaw, tracked as CVE-2026-136998, with a dummy key and a test server on his own machine. No attacks using it have been reported so far.

The product's promise is that raw keys never enter the sandbox. A developer stores a key on the host with sbx secret set, the agent inside the virtual machine sends requests with a placeholder header, and a proxy on the host swaps in the real key on the way out.

Which destinations receive the real key is decided by the kit, a packaged agent configuration fetched from a registry, a Git reference, or a local folder. Since version 0.43.0, released September 15, approving a kit's credential request writes a binding that records the service and the domains the developer agreed to.

That recorded list was never read back, the researcher found. At request time, the check only asked whether a binding existed for the service name, and the proxy then sent the real key to whatever domains the current version of the kit named. "The domains the operator approved play no part in that decision," he wrote in his technical analysis.

In his test, a kit approved with api.anthropic.com as its only destination was replaced at the same reference with a version that pointed to a test server instead. The next sandbox creation showed no prompt, and the proxy delivered the dummy key to that server in cleartext. The approval even survived the sandbox's deletion.

Nothing warned the developer afterward either: the policy log recorded the connection as allowed and said nothing about a key being injected into it. A malicious kit version could also add its own server to the sandbox's network allowlist without a prompt, he found.

The flaw, introduced by the consent system added in 0.43.0, affects every version before 0.55.0 on macOS, Windows and Linux, according to the official CVE record the vendor published today.

Thirteen built-in integrations share the key-injection path, including Anthropic, OpenAI, GitHub, and Google, and Kennedy tested one of them, Anthropic, with a dummy value.

He rates the flaw 8.2, High, under CVSS 3.1, after first scoring it 9.3 Critical and correcting the attack vector to local: the malicious kit is a file the developer fetches, not a service an attacker reaches over the network. Under the newer CVSS 4.0 his score is 6.9 and the vendor's is 5.6, both Medium. The two vectors differ on whether harm to the provider account behind a stolen key counts in the base score.

The attacker never needs access to the developer's computer, only a one-time approval and a single changed line in the kit's next version. Other checks held in his testing: a kit cannot impersonate a built-in agent, and the consent prompt still defaults to decline.

The damage follows the key. Secrets stored with sbx secret set are global by default, so a redirected key is the one every sandbox on the machine uses. A stolen GitHub token grants whatever its scopes allow, which for a typical developer token includes write access to their repositories, according to the researcher.

The research covered the local product. Cloud sandboxes maintain a separate secret store, and it has not been established whether they ever shared the affected authorization logic.

Upgrading to 0.55.0 removes the flaw. The version's release notes say kit credential injection now enforces the destinations approved for API keys and for OAuth separately, and treats a binding with no approved destinations as missing.

For machines still on older versions, and for anyone who granted credentials to third-party kits while vulnerable, the researcher recommends a short set of steps:

  • Review the approvals file, ~/.config/sbx/credentials.yaml, or %APPDATA%\sbx\credentials.yaml on Windows, and remove any binding granted to a third-party kit. The file records approvals, not key values, as the vendor's credential documentation explains.
  • Read a kit's inject domains and its permissions.network.allow entries on every sbx create, not only the first.
  • Where the kit source allows it, pin kits to a fixed commit, or keep a reviewed copy in a local folder.
  • Store keys per sandbox with the --sandbox flag instead of globally.
  • Rotate the provider keys behind any approved third-party kit that later changed.

The researcher also asked Docker to tie approvals to a kit's content digest and to record every key injection in the policy log. The published notes confirm the destination enforcement and do not mention those two changes.

The bug is his second in the product within a month, and both were reported to the vendor on September 21. The earlier one, a file-copy flaw that allowed an agent to access host files outside its approved folders, was fixed on November 3.

In both cases, he says, the virtual machine boundary held, and the failure sat in what the developer's approval was attached to.

"a prompt is only as strong as what its answer is bound to. If the approval is not tied to the artifact that was inspected, the next update inherits it.," Kennedy wrote.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by The Hacker News
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗