Research · AI security · AI coding agents · Supply chain

Docker Sandboxes CVE-2026-136998: a kit update could redirect your API key

CVE-2026-136998: Docker Sandboxes saved the destinations you approved for an API key and never checked them. How the kit swap works and what to change.

· 6 min read

Short answer

Docker fixed CVE-2026-136998 in Docker Sandboxes 0.55.0 on 30 November 2026. From 0.43.0 on, sbx saved the destinations you approved for a credential but did not enforce them. A third-party agent kit you had approved once could change its destination, and the host proxy would send your real provider key there with no new prompt. Endor Labs demonstrated it with a fake Anthropic key, and the CVE record lists no known exploitation. Upgrade, review your saved approvals and pin kits to a digest or a commit.

If you run a coding agent in Docker Sandboxes with a kit that didn’t ship with sbx, upgrade to 0.55.0 or later before the next sbx create. The CVE record for CVE-2026-136998 says versions from 0.43.0 on, before 0.55.0, “recorded approved credential destinations” and then “did not enforce them during proxy substitution for third-party kits.”

You approved a key for one domain. The proxy would send it to whichever domain the kit named that day.

One approval, two destinations

Day 1 · Kit v1 asks for the key and you approveLater · Kit v2 arrives under the same tag. No new prompt

SandboxYour coding agent and a third-party kit

Kit v1 says: send the key toapi.anthropic.com

Kit v2 says: send the key tothe attacker's host

placeholder only
Host proxySwaps in your real key on the way out

Service namechecked

Saved domainsnever read

real API key
api.anthropic.comThe domain you approved
Attacker's hostNever approved by youyour real key

You approved the key for one domain. Before 0.55.0, the proxy sent it wherever the kit pointed.

Our drawing of the attack Endor Labs demonstrated, with a fake key and a test server on the researcher's own machine. Fixed in sbx 0.55.0.

What Docker Sandboxes promises

Docker Sandboxes runs AI coding agents in isolated environments on your machine or on Docker’s cloud. Its sidebar lists Claude Code, Codex, Copilot, Cursor and others. You store a provider key on the host with sbx secret set, and the credentials documentation says “the real value never enters the sandbox.” The agent sends a placeholder such as proxy-managed. A proxy on the host swaps in the real key on the way out.

Agents come packaged as kits. Docker’s kit documentation says “the built-in agents are kits that package an environment, tools, and runtime settings”, and you can load someone else’s kit from a published image, a local directory or a Git reference. A kit can ask for a credential. When it asks for one that has no saved approval (Docker calls it a binding), sbx prompts you, and your answer goes into credentials.yaml. Kits shipped with sbx skip the prompt.

According to Endor Labs, which found the bug, that consent prompt arrived in 0.43.0. It shows each credential and the domains it will go to.

The approval that was saved and never read

Endor’s write-up puts the defect in one line: “The binding’s domains list is written and never read.” At run time, sbx asked a yes-or-no question about the service name. Has this user approved anthropic? If yes, the proxy injected the real key at whatever domains the kit in front of it declared.

There was a second gap. In Endor’s words, “the binding also says nothing about which kit it was granted to.” It wasn’t tied to a kit name, a content digest or a source.

What your approval covered in sbx 0.43.0 and later, before 0.55.0

1The service namefor example, anthropicchecked
2The destination domainssaved in credentials.yamlnever read
3Which kit you approvedname, digest or sourcenot recorded
4The kit's network allow listpermissions.network.allowno prompt
Our layout of the findings in the Endor Labs write-up and the CVE record, read 4 December 2026.

The attack Endor Labs demonstrated

One honest prompt, then a quiet swap

1. Kit v1 is publishedIts inject block names only api.anthropic.com
looks normal
2. You approvesbx create shows an accurate prompt, and the binding is saved
credentials.yaml
3. Kit v2 replaces itSame reference. Only the inject domain changes, to the attacker's host
tag or branch
4. Next sbx createThe service-name check passes. No prompt, no diff
before 0.55.0
5. The proxy sends the keyThe real credential goes to the new host
logged as allowed
Our layout of the steps in the Endor Labs write-up. The test used a fake key and a canary server on the researcher's own machine.

Nobody has to break out of the sandbox for this. The key never enters it. The host proxy does the leaking, on instructions from a file the attacker can edit.

Endor ran this with a dummy value, sk-ant-FAKE-CANARY-deadbeef, and a canary server on loopback, and reports that “the header arrived in cleartext over plain HTTP.” As a last check the researcher edited the saved binding to allow only example.invalid. The write-up says “the leak was identical.”

The limits matter here. Only the Anthropic service was demonstrated. Endor says the other built-in services “follow the shared code path and were not demonstrated separately”, and the variant where a different kit reuses the approval wasn’t demonstrated either. The CVE record adds the precondition: “Exploitation requires an operator to have previously approved the service and subsequently launch the modified kit.” Its CISA assessment lists exploitation as “none”.

What bothers me most is the log line. Endor found that sbx policy log “records the connection to the canary host as allowed and says nothing about a credential being injected into it.” You couldn’t have spotted the leak there afterward.

How bad is it

CVE-2026-136998 in numbers

5.6CVSS v4.0medium, scored by Docker
8.2CVSS v3.1high, scored by Endor Labs
0.43.0first affected versionfixed in 0.55.0
70days, report to fix21 Sep to 30 Nov 2026
Source: the CVE record as shown by OpenCVE and the Endor Labs write-up, read 4 December 2026. The day count is ours.

The two scores disagree. Docker, which assigned the CVE, rates it 5.6 on CVSS v4.0, medium. Endor scored it 8.2 on CVSS v3.1, high, after first drafting a 9.3 with a network attack vector. The weakness class is CWE-863, incorrect authorization.

Your own exposure comes down to which keys are stored and how widely. The documentation says “service secrets are global by default, so the secret is available to all sandboxes.” For a model provider key, Endor describes the impact as metered API access billed to the victim. The Railway breach shows how fast that bill grows. A GitHub token is worse: Endor notes that a typical developer token’s scopes “include write access to the victim’s repositories.”

Endor reported the bug on 21 September 2026. Docker shipped the fix on 30 November, and the CVE record was published on 1 December.

What 0.55.0 changes

Docker’s release notes for 0.55.0 name the CVE and say “credential injection now enforces the approved destinations for API keys and OAuth tokens.” The GitHub release gives the detail: “Kit credential injection respects the destinations approved separately for API keys and OAuth in credential bindings.” An old approval with no destinations doesn’t slip through either: “Bindings with no approved destinations are treated as missing.”

The same release tightens the area around it. Host-managed API keys go only to HTTPS endpoints. Custom secrets are substituted “only into explicitly bound request headers” or a default set you configure.

Endor also lists controls that held up under testing. Kits can’t take a built-in agent’s name, sbx kit add refuses kits that declare credentials, and a non-interactive run declines the credential, with no --yes flag to override it.

What to do this week

  1. Upgrade sbx to 0.55.0 or later. Read the breaking changes first: this version stops reading a list of environment variables, and the release tells you to save each override with sbx settings set <key> <value> before you upgrade.
  2. Open ~/.config/sbx/credentials.yaml and remove the bindings you granted to third-party kits. The next run will ask again, and from 0.55.0 the answer is enforced.
  3. If a third-party kit you approved changed afterward, rotate the provider keys it could reach. This is Endor’s advice. The policy log didn’t record injections, so you can’t prove a clean history from it.
  4. Pin kits. Docker’s documentation says to use “a digest to identify exact content”. For a Git source, ref selects the revision, so give it a commit hash instead of a tag or a branch. A tag or a branch can point at new content tomorrow, and step 3 of the attack depends on that. The Cursor breach went the same way: tampered copies of an extension arrived through the editor’s own extension cache.
  5. Scope keys to one sandbox. Pass --sandbox to sbx secret set so a key isn’t shared with every sandbox on the machine.
  6. If your kits come from a registry, set up a trusted signer policy and turn on kit.requireSignature. The documentation notes that source directories and Git sources don’t support the signing workflow, so those need the pin from step 4.

One more, ours, for anyone who builds agent tooling: test your own approval flow the way Endor did. Save an approval, change the thing that was approved, and watch whether the system notices.

Sources

All checked on 4 December 2026.

Try it in a lab Op Rug Pull MCP servers that change. In your browser, about 25 minutes.

Every TSG course

Enroll: Monthly or Lifetime

Both plans open every course on the platform, with every lab and every future update, the day you join.

  • 33courses
  • 430+videos
  • 3clouds included
  • All 33 courses, from Learn 101 to AI Security Engineer
  • 430+ videos across AI Security Engineer and the cloud courses, plus reading pages, quizzes and handbooks
  • Browser labs, laptop labs and cloud labs on AWS, Azure and Google Cloud
  • A certificate for each course you finish, with a public verify link
  • New courses at no extra cost, and every future update

Already a member? Sign in

Choose your plan
Need an invoice for a company?

Paid by card in US dollars. Final price: nothing is added at checkout. You pay on Razorpay's secure page; we never see your card or bank details.

  • Paid on Razorpay's secure page: Card, in US dollars
  • Refund policy