Sessionboxer

A kit you approved once could send your API key somewhere else on its next update. What CVE-2026-136998 in Docker Sandboxes says, and what to check

A Docker Sandboxes kit approved once could send your real Anthropic, OpenAI or GitHub key to another host on its next update. 0.55.0 fixes it.

The Repositories dialog of a Sessionboxer session, with one GitHub repository bound to an account and a second git URL being added, next to the session's desktop showing Firefox

You use Docker Sandboxes so your coding agent never holds your API keys. You store the key on your machine, the agent inside the microVM sends a placeholder, and a proxy on the host puts the real key on the request as it leaves. Then you try a third-party kit, read the prompt that says your Anthropic key will go to api.anthropic.com, and approve it. Until November 30, that one approval also covered every later version of the kit, wherever it pointed your key.

Peyton Kennedy of Endor Labs published the details as CVE-2026-136998 on November 30, 2026. Docker fixed it the same day in Docker Sandboxes 0.55.0. Every version from 0.43.0 up to 0.55.0 is affected, on macOS, Windows and Linux. No attacks using it have been reported.

This post explains the bug in plain words, what to check on your machine today, and how the same question looks in Sessionboxer, which we make. It is based on Endor's write-up, Docker's docs and the CVE record as of December 2.

How Docker Sandboxes hands out keys

The credentials docs describe the design. You store a key with sbx secret set anthropic. It goes into your OS keychain, and by default it is global: every sandbox on the machine can use it. The agent in the sandbox sends requests with a sentinel header such as x-api-key: proxy-managed. A proxy on the host sees the request, checks that it goes to a destination the kit declared, and writes the real key into the header.

A kit is a packaged agent configuration. Docker's built-in agents ship their own. Third-party kits are fetched by reference, from a registry tag, a Git branch or a local folder. Among other things, a kit says which domains should receive which credential.

Since 0.43.0, released on September 15, a third-party kit has to ask first. sbx create shows each credential the kit wants and the domains it will be sent to, and the default answer is no. If you say yes, sbx writes a binding to ~/.config/sbx/credentials.yaml (%APPDATA%\sbx\credentials.yaml on Windows). The file records the approval, not the key:

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

What went wrong

The domains list in that file was written and never read. When a request went out, the proxy only asked whether a binding existed for the service name. If it did, the real key went to whatever domains the current version of the kit named.

The binding also did not say which kit it was for. It was not tied to a kit name, a content digest or a source. So an approval given to version 1 of a kit carried over to version 2 at the same reference.

Endor's demonstration used a dummy key and a test server on loopback. Kit A named api.anthropic.com. It was approved, and the sandbox was removed. Kit B was identical except for one line: its inject domain was the test server. The next sbx create showed no prompt, and the test server received the dummy key in a plain HTTP header. As a last check, Kennedy rewrote the approved domains to example.invalid. The key still went to the test server.

Two more details make it worse. A kit's permissions.network.allow entries were applied without a prompt, so the same update could open the sandbox's egress to the attacker's host. And sbx policy log recorded the connection as allowed without mentioning that a key was injected.

All thirteen built-in services share the injection code: Anthropic, Copilot, Cursor, Devin, Droid, GitHub, Google, Groq, Mistral, Nebius, OpenAI, OpenRouter and xAI. Kennedy tested Anthropic. A model provider key means usage billed to you. A GitHub token means whatever its scopes allow, which for many developers is write access to their repositories.

The severity scores disagree. Endor rates it High, 8.2 on CVSS 3.1. On CVSS 4.0, Endor says 6.9 and Docker says 5.6, both Medium. The attack vector is local because the bad kit is something you fetch yourself. The attacker never needs access to your machine, only your one approval and a changed line in the next version.

The microVM boundary held throughout, and the agent never saw the raw key. What failed was what your yes was attached to.

What 0.55.0 changes

The release notes say credential injection now enforces the approved destinations, separately for API keys and OAuth tokens. A binding with no approved destinations counts as missing.

The same release has other credential changes worth knowing before you upgrade:

  • External endpoints must use HTTPS to receive host credentials. Plain HTTP requests are still forwarded but get no key.
  • Custom secrets go only into bound headers or the headers in secret.custom.defaultHeaders, and must be at least eight characters long.
  • Workspaces that overlap the Sandboxes config or credential directories are refused. A workspace set to your whole home directory can trip this.
  • Settings such as DOCKER_SANDBOXES_KIT_REQUIRE_SIGNATURE are no longer read from the environment. Save them with sbx settings set before you upgrade, or they fall back to their defaults.

Kennedy also asked Docker to tie approvals to a kit's content digest and to log every key injection. The release notes do not mention either.

What to check today

First, upgrade to 0.55.0 or later.

Second, open credentials.yaml and look at each binding. Remove any you granted to a third-party kit, then approve again on purpose the next time you use it.

Third, if you approved a third-party kit on an older version and that kit has changed since, rotate the keys it was allowed to use. That means the provider key, and the GitHub token if the kit asked for github. The old binding may have sent them anywhere the new version named.

Then make the next kit harder to swap under you:

$ sbx settings set kit.allowedSources '["docker.io/","github.com/your-org/"]'
$ sbx settings set kit.allowLocalKits false
$ sbx secret set anthropic --sandbox my-sandbox

The first two limit where kits may come from. The third stores a key for one sandbox instead of all of them, so a leaked key is one you can revoke without breaking everything else. Where the source allows it, pin a kit to a fixed commit or keep a reviewed copy in a local folder. Docker's kit docs also describe signature checks with kit.trustedSigners and kit.requireSignature; they work for signed OCI kits, not Git sources or plain folders.

This is the second bug Kennedy reported in Docker Sandboxes. The first, a symlink that turned sbx cp against your machine, was fixed in 0.51.0.

How Sessionboxer handles keys, and what it does not do

Sessionboxer works differently here, and in one respect it gives you less. It has no host-side proxy that swaps a placeholder for the real key. When you connect your agent, the token you paste (from claude setup-token, codex login and so on) goes only into the boxes of sessions that use that agent. It lives on tmpfs inside the box and never goes into a snapshot. But the agent in that box holds the real token, and anything running in the box can read it. Docker's design keeps the key out of reach of the agent; ours does not try to.

What Sessionboxer does not have is kits. The agent runs from Sessionboxer's own Sandbox image for that agent, tagged with the Sessionboxer release, and there is no third-party package that decides where your credentials go. Each session gets its own Docker container, so a token is in a box only while a session that needs it runs.

Other secrets follow the same pattern. A GitHub login switched on for a session logs the box in on tmpfs, and switching it off removes it. MCP servers you register can have values marked secret: they are stored in ~/.sessionboxer/config.json, never shown again in the UI and never put into snapshot images. A command-based MCP server still runs inside the box with those values.

Sessionboxer also does not filter outbound traffic. Our own design notes say an agent with a leaked token could send it out. So the advice from our post on keeping secrets away from a coding agent applies: switch on only the logins a task needs, and prefer a token scoped to one repository over your whole account. If you need a proxy that decides which requests may leave, put one in front of the Docker network, or use a sandbox that has one, kept up to date.

Features mentioned

Keep reading