← All articles

Docker Sandboxes flaw bypassed approved API key destinations

Docker Sandboxes flaw bypassed approved API key destinations

Docker Sandboxes flaw CVE-2026-136998 allowed a later update to an approved AI agent kit to redirect protected API keys to an attacker-controlled server without asking the developer again. Docker fixed the issue in version 0.55.0. No attacks exploiting the flaw have been reported.

Docker Sandboxes runs AI coding agents inside isolated virtual machines, which are software-based computers separated from the main system. Its design keeps raw credentials outside the sandbox. A developer stores a key with `sbx secret set`; the agent sends requests containing a placeholder, and a proxy, a service that forwards requests while changing them, inserts the real key on the host before the request leaves the computer.

The destinations allowed to receive that key are defined by an agent kit. A kit is a packaged agent configuration obtained from a registry, a Git reference or a local folder. Since version 0.43.0, released on September 15, approving a kit's request for credentials has created a binding that records the service and the domains the developer accepted.

The problem was that Docker Sandboxes recorded those domains but did not check them again. When a request was made, the system only verified that a binding existed for the service name. The proxy then sent the real key to whichever domains the current kit version listed. This meant an update at the same reference could change the destination without triggering another consent prompt.

In testing by an Endor Labs researcher, a kit was initially approved to use only `api.anthropic.com`. The kit was then replaced at the same reference with a version pointing to a test server on the researcher's own machine. When a new sandbox was created, no new prompt appeared and the proxy delivered a dummy key to that server in cleartext, meaning without protection from encryption. The approval also remained after the sandbox was deleted.

The policy log did not alert the developer. It recorded the connection as allowed and did not say that a key had been inserted. The updated kit could also add its own server to the sandbox's network allowlist, the list of destinations the sandbox may contact, without another prompt. Other checks in testing remained in place: a kit could not impersonate a built-in agent, and the consent prompt still defaulted to decline.

The flaw affects every Docker Sandboxes version before 0.55.0 on macOS, Windows and Linux, according to the official CVE record. Thirteen built-in integrations use the affected key-injection path, including Anthropic, OpenAI, GitHub and Google. The researcher tested Anthropic with a dummy value.

The vulnerability received a CVSS 3.1 score of 8.2, rated High. It was first scored 9.3, Critical, before the attack vector was corrected to local because the malicious kit must be a file the developer fetches, rather than a service reached over the network. Under CVSS 4.0, the researcher rated it 6.9 and the vendor rated it 5.6, both Medium. The two scores differ over whether damage to the provider account behind a stolen key should count in the base score.

An attacker would not need access to the developer's computer. The required conditions were a one-time approval and one changed line in a later kit version. Secrets stored with `sbx secret set` are global by default, so a redirected key could be used by every sandbox on that machine. A stolen GitHub token would provide whatever access its scopes allow, which the researcher said typically includes permission to write to a developer's repositories.

The research covered the local product. Cloud sandboxes use a separate secret store, and it has not been established whether they ever shared the affected authorization logic. Docker's 0.55.0 release notes say kit credential injection now enforces approved destinations separately for API keys and OAuth, a system for delegated account access, and treats a binding with no approved destinations as missing. The notes do not mention two additional changes requested by the researcher: tying approvals to a kit's content digest and recording every key injection in the policy log.

People who used vulnerable versions and approved third-party kits should review `~/.config/sbx/credentials.yaml`, or `%APPDATA%\sbx\credentials.yaml` on Windows, and remove bindings granted to those kits. The file records approvals, not the key values. Users should inspect a kit's injection domains and `permissions.network.allow` entries every time they create a sandbox, pin kits to a fixed commit where possible, or keep a reviewed copy in a local folder. Keys can also be stored per sandbox with the `--sandbox` option instead of globally, and provider keys should be rotated if an approved third-party kit later changed.

The issue was the researcher's second Docker Sandboxes bug in one month. Both were reported to Docker on September 21. The earlier bug, fixed on November 3, involved copying files and allowed an agent to access host files outside its approved folders. In both cases, the virtual machine boundary held. The failure was in what the developer's approval remained attached to as the kit changed.

For website owners and IT teams, the broader lesson is to keep credentials narrowly scoped and review changes to software that has already received permission. AEU Hosting provides managed WordPress hosting, secured end to end, for website owners who need a security-focused hosting environment.

Also available in: DeutschItalianoShqip