December 2, 2026

Docker Sandboxes Flaw Let a Kit Update Steal Your API Keys. Update to 0.55.0

Watch the Video

Docker Sandboxes makes one clear promise to developers: your API keys never enter the sandbox where an AI coding agent runs. A flaw tracked as CVE-2026-136998 broke that promise in a quiet way. A third-party agent kit could collect one honest approval from you, then push an update that sent your real Anthropic, OpenAI or GitHub key to a server the attacker controls. No new prompt. No warning. No record in the logs that a key was sent.

Docker fixed it in version 0.55.0, released 30 November 2026. If you use Docker Sandboxes, update now, and then check the approvals you have already given. The update alone does not clean up old approvals.

What Docker Sandboxes is, and what it promises

Docker Sandboxes runs AI coding agents inside isolated virtual machines, called microVMs, on your own computer. You give the agent a task, and it writes code inside the sandbox, cut off from the rest of your machine.

The product’s central promise is about secrets. Your API keys stay on the host, outside the sandbox. The agent inside the microVM never holds the real key. When the agent needs to call an AI provider, it sends a request with a placeholder header, such as x-api-key: proxy-managed. A proxy on the host recognises requests bound for an approved destination and swaps the placeholder for the real key on the way out. A compromised agent can use the key through the proxy, but it never holds the key itself.

Which destinations get the real key is decided by the kit. A kit is a packaged agent configuration. Built-in agents ship their own kits. Third-party kits are fetched by reference, from a tag, a branch or a directory, and can declare credentials for the same built-in services.

That design is sound, as long as the approval means what the developer thinks it means. CVE-2026-136998 is about the approval meaning less than it appeared to.

How the approval was supposed to work

Since version 0.43.0, released 15 September 2026, a third-party kit has to ask for consent before it can use your credentials. When you run sbx create on a terminal, the tool shows you each credential the kit wants and the domains it will be sent to. If you approve, it writes a binding to ~/.config/sbx/credentials.yaml (or %APPDATA%\sbx\credentials.yaml on Windows). The binding records the service name and the domains you agreed to, like this:

anthropic:
  apiKey:
    domains:
    - api.anthropic.com

The prompt is truthful, and the default is safe. If you do not approve, the kit gets nothing. The problem is what happens to that domains list afterward.

The flaw: the approved list was written and never read

Researcher Peyton Kennedy of Endor Labs found that the binding’s domains list is written to the file and never read back. At request time, the check is only a yes or no question keyed on the service name: if credentials.yaml has a row for anthropic, the proxy injects the real key at whatever domains the current kit declares in its inject block. The domains you approved play no part in that decision.

The binding also says nothing about which kit it was granted to. It is not keyed by kit name, by content digest, or by source. An approval obtained by one version of a kit transfers to every later version fetched from the same reference, and by the same logic to any other third-party kit that declares the same service. Kennedy demonstrated the version swap. He did not demonstrate the cross-kit case, and this post will not claim he did.

Those two gaps combine into an attack the developer cannot see:

  1. The attacker publishes kit version 1. Its inject block names only api.anthropic.com.
  2. You run sbx create against it, read a prompt that accurately says the key goes to api.anthropic.com, and approve. The binding is written.
  3. The attacker ships kit version 2 at the same tag, branch or directory. The only change is the inject domain, now a host they control.
  4. Your next sbx create finds a binding row for anthropic and passes. There is no prompt, no warning, and no diff shown.
  5. The proxy substitutes your real key into requests to the attacker’s host.

The kit also opens its own route out. Its permissions.network.allow entries are applied without a prompt, so version 2 can add the attacker’s host to the sandbox’s egress allowlist in the same file that redirects the key.

One detail made the root cause easy to confirm. The binary already contains a function called sandboxlib/bindingconsent.MissingDomainsForService, whose name describes exactly the check that is missing. It does not appear to gate the runtime path.

The demonstration: a dummy key, his own machine, cleartext

Kennedy demonstrated the flaw with a dummy credential and a test server on his own machine, so no real key or external host was involved. The two kits were identical except for one line: kit A named api.anthropic.com, and kit B named canary.localtest.me, a name that resolves to his own computer.

He stored a dummy Anthropic credential, approved kit A at the prompt, tore the sandbox down, and then created a sandbox from kit B. No prompt appeared. When the sandbox sent a request with the placeholder header, the host proxy substituted the dummy key and delivered it to the test server. The header arrived in cleartext over plain HTTP. The attacker needs no TLS interception and no network position, only an endpoint that accepts a request.

To rule out any partial matching against the approved list, he rewrote the binding’s domains to [example.invalid], a value with no relationship to either kit. The leak was identical. The recorded list has no effect on where the key goes.

And what does the developer see afterward? After the approval in step one, nothing. The second sbx create shows no prompt. The policy log records the connection to the attacker’s host as allowed and says nothing about a credential being injected into it. An operator reviewing logs afterward sees an ordinary permitted request.

No attacks using this flaw have been reported so far. That matters, and this post will not pretend otherwise. But the flaw was live for 76 days, from 15 September to 30 November, and the attack looks like an ordinary software update. The absence of reported attacks is not proof that none happened.

Who is affected

The flaw affects every Docker Sandboxes version from 0.43.0 up to, but not including, 0.55.0, on macOS, Windows and Linux. Versions before 0.43.0 are not affected by this defect, because no binding mechanism existed to bypass. The CVE record is published by Docker itself, and the NVD entry was published 1 December 2026.

Thirteen built-in services share the same key-injection path: Anthropic, Copilot, Cursor, Devin, Droid, GitHub, Google, Groq, Mistral, Nebius, OpenAI, OpenRouter and xAI. Kennedy tested the Anthropic path with a dummy value. The other twelve follow the shared code path and were not demonstrated separately.

The realistic target is your global provider key. sbx secret set stores credentials globally by default, so the key a kit can redirect is the same one every sandbox on the machine uses. For an AI provider, that means metered API usage billed to your account. For GitHub, a token can grant write access to your repositories, because a typical developer token includes write scopes.

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 authorisation logic. If you only use cloud sandboxes, do not assume you were affected, and do not assume you were safe either. Check with Docker’s advisory.

Endor Labs rates the flaw 8.2, High, under CVSS 3.1, after first scoring it 9.3 Critical and correcting the attack vector to local, because the malicious kit is a file the developer fetches, not a service an attacker reaches over the network. Docker’s own CVE record rates it 5.6, Medium, under CVSS 4.0. The difference is about scoring method, not about whether the flaw is real. The weakness is CWE-863, Incorrect Authorization.

This was Kennedy’s second Docker Sandboxes finding within a month. The first, CVE-2026-103916, let the file-copy command reach past the folders a sandbox was allowed to touch. Docker fixed that one in version 0.51.0 on 3 November 2026. Both were reported to Docker on 21 September 2026. In both cases, the isolation itself held: the microVM boundary never broke, and raw keys never entered the guest. The failure sat in what the operator’s decision was attached to. With the file copy, the operator approved a path, and the path resolved somewhere else. Here, the operator approved a destination, and the product remembered only the service name.

The fix in 0.55.0

Upgrade to Docker Sandboxes 0.55.0. The 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. The release also stops sending host credentials over plain HTTP, which blocks the exact cleartext delivery Kennedy demonstrated, although an attacker with an HTTPS endpoint would not be stopped by that change alone.

Kennedy also asked Docker to tie approvals to a kit’s content digest, so an approval cannot survive a kit change, and to record every key injection in the policy log, so a leak is visible afterward even where prevention fails. The published notes confirm the destination enforcement but do not mention those two additional changes. The broader question he flagged is still open: how tightly approvals are bound to the kit content you actually inspected, and how transparently key injections are logged.

Note one more thing before you update: the 0.55.0 release notes say the CLI stops reading several environment variables, including DOCKER_SANDBOXES_KIT_REQUIRE_SIGNATURE and DOCKER_SANDBOXES_KIT_ALLOWED_SOURCES. If your setup relies on those, check the release notes before you upgrade, and set the equivalent configuration the new version expects.

What to do now, in order

1. Update to 0.55.0

Run the update on every machine that runs Docker Sandboxes. Check the version first with sbx version. Anything from 0.43.0 up to below 0.55.0 is affected.

2. Review your credential approvals

Open ~/.config/sbx/credentials.yaml, or %APPDATA%\sbx\credentials.yaml on Windows, and remove any binding you granted to a third-party kit. Each one is a standing approval for whatever that kit’s reference serves next. The update does not clean these up for you. A binding granted while vulnerable is still a binding after the update, and the fix only enforces the destinations it records, so a binding with no destinations is now treated as missing, but a binding with real destinations still stands.

3. Read the kit every time, not just the first time

Check a kit’s inject domains and its permissions.network.allow entries on every sbx create, not just the first. The product will not show you a change. If the kit comes from a source you control, fetch a fixed commit rather than a tag or branch, or keep a reviewed copy in a local directory you control.

4. Scope your keys to sandboxes

sbx secret set stores credentials globally by default. A key set with --sandbox limits what a redirected binding can reach. Scope the keys that matter most, and keep your most powerful keys, such as a GitHub token with write access, out of global storage.

5. Rotate any key a changed kit could have reached

If you approved a third-party kit that later changed, rotate the affected provider keys. A stolen Anthropic or OpenAI key costs you money until it is revoked. A stolen GitHub token can change your code. Rotation is the only way to be sure a key that left the machine is dead.

Why this matters if you run a website

You may never have opened Docker Sandboxes. But the pattern in this story is the same one running through every post we have published this month, and it applies to your website directly.

AI agents now do real work: they write code, they call APIs, they hold keys. The tools that run them make promises about isolation, and those promises are usually true in the way they are written. The failures happen one step sideways: not a broken wall, but a decision attached to the wrong thing. An approval remembered by service name instead of by the kit you inspected. A file path that resolves somewhere else. A script your site loads that turns out to belong to someone else.

Your website holds secrets too: database passwords, API keys for payment and email providers, tokens for third-party services. The same rules apply. Keep secrets out of code and out of files the web server can serve. Scope them as narrowly as you can. Rotate them when a tool you trusted shows a systemic flaw. And update the same day, because the fix for this flaw was available on 30 November, and every day after that is a day you chose to stay vulnerable.

The wider pattern is now unmistakable. In the last month, Switzerland confirmed 5 AI-assisted attacks, Canada confirmed an AI-enabled breach of a government system, and AI agents found a zero-day in 11 minutes. Attackers are not breaking walls. They are walking through the doors we approved, and changing what is behind them.

If you think your site is already hacked, read My WordPress Site Was Hacked: What to Do First and act the same day.

The honest summary

CVE-2026-136998 let a third-party AI agent kit reuse one honest approval to send your real API key to an attacker’s server, with no new prompt and no log entry. It affected Docker Sandboxes 0.43.0 through 0.54 on macOS, Windows and Linux, across thirteen built-in services. No real-world attacks have been reported, and the researcher proved it with a dummy key on his own machine. The fix is in 0.55.0, released 30 November 2026.

Update now, review the approvals in your credentials file, and rotate any key a changed kit could have reached. An approval that survives a kit change is not an approval at all.

If you need help with any of it, contact us. A hacked site, or a site that has not been updated in months, is exactly the kind of job we do, and the first step is a free website audit.

Related guides

Contact us

Leave a Reply

Your email address will not be published. Required fields are marked *