For Docker Sandboxes, Approval Wasn't Enough
A researcher found that a one-time credential approval in Docker Sandboxes survived later kit updates that redirected real API keys to attacker servers.
The pitch behind Docker Sandboxes is containment: an AI coding agent works inside a virtual machine, and the developer's real API keys stay on the host, out of the agent's reach. Endor Labs researcher Peyton Kennedy reported that a flaw in how the product recorded and honored credential approvals meant a third-party agent kit, once approved, could later send a developer's real Anthropic, OpenAI, or GitHub key to a server the attacker controls — with no new prompt.
Docker addressed the issue in version 0.55.0, and the flaw is tracked as CVE-2026-136998. Kennedy demonstrated the behavior with a dummy key and a test server on his own machine. No attacks using it have been reported so far.
How the key swap works
The product's central 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 carrying a placeholder header, and a proxy on the host swaps in the real key on the way out. The key itself is never exposed to the agent process.
What determines which destinations receive that real key is the kit: a packaged agent configuration fetched from a registry, a Git reference, or a local folder. Kits let developers extend an agent's setup, and they are meant to be vetted at the moment the developer grants them access to a stored credential.
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 record was the apparent safeguard: an explicit list of where the key was allowed to go. According to Kennedy's findings, the list was never consulted again.
A binding that only checked a name
At request time, the check asked only whether a binding existed for the service name. The proxy then sent the real key to whatever domains the current version of the kit named. The recorded destinations, the ones the developer actually reviewed and approved, had no bearing on the decision.
That distinction matters because of how kits are delivered. A kit fetched from a registry or a Git reference can be updated by whoever controls that reference. The developer approves a specific version; the product, as Kennedy found it, kept honoring the approval across later versions.
In his test, a kit approved with api.anthropic.com as its only destination was replaced at the same reference with a version pointing to a test server instead. The next sandbox creation produced no prompt, and the proxy delivered the dummy key to that server in cleartext. The original approval even survived deletion of the sandbox it was granted for.
No warning, by design or oversight
Nothing alerted the developer after the fact, either. The policy log recorded the connection as allowed and said nothing about a key being injected into it. A developer reviewing logs after the fact would see an ordinary permitted connection, not the exfiltration path that carried the credential.
Kennedy also found that a malicious kit version could add its own server to the sandbox's network allowlist without a prompt — a second capability that, combined with the redirect, removes the friction an attacker would otherwise face.
He summarized the core weakness in his technical analysis: the domains the operator approved play no part in the decision at request time.
"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.,"
— Peyton Kennedy, researcher at Endor Labs
Thirteen integrations share the path
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.
Its reach is set by how many integrations route through the same key-injection code. Thirteen built-in integrations share that path, including Anthropic, OpenAI, GitHub, and Google. Kennedy tested one of them, Anthropic, using a dummy value rather than a live credential.
The attacker's cost is low. No access to the developer's computer is required — only the one-time approval already granted and a single changed line in the kit's next published version.
What held up in testing
Not every control failed. Kennedy found that a kit cannot impersonate a built-in agent, which would otherwise let it inherit trust it was never granted. The consent prompt also still defaults to decline, so a developer who never approves a third-party kit's credential request is not exposed through this path.
Those details matter for scoping the problem: the flaw sits in what happens after a developer says yes, not in whether the product asks.
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. The blast radius is not limited to the sandbox that received the malicious kit update.
What a stolen credential grants depends on the token. A GitHub token, for instance, 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.
Severity scores that moved
Kennedy first scored the flaw 9.3 Critical, then corrected the attack vector to local and revised it to 8.2, High, under CVSS 3.1: 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.
- Affected versions: every release before 0.55.0, across macOS, Windows and Linux
- Fixing version: 0.55.0
- Consent system introduced in: 0.43.0, released September 15
- Built-in integrations sharing the key-injection path: 13
- CVSS 3.1 score: 8.2, High, after an initial 9.3 Critical
- CVSS 4.0 scores: 6.9 from the researcher, 5.6 from the vendor, both Medium
- Both of Kennedy's reports in this product were sent to the vendor on September 21
What 0.55.0 changes
Upgrading to 0.55.0 removes the flaw. The version's release notes state that 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.
Kennedy has 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.
Steps for machines still exposed
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.
A second report in the same month
The bug is Kennedy's 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. The failure sat in what the developer's approval was attached to. The agent stayed boxed in; the permission it was given traveled further than intended.
Why it matters
The consent prompt is one of the few places a developer running agent tooling exercises direct judgment over what a third-party component can reach. This research suggests that judgment is only as durable as the artifact it was recorded against. An approval tied to a name, rather than to a specific version of the code that was inspected, can be inherited by whatever arrives next at the same reference.
For teams that granted credentials to third-party kits before upgrading, the rotation step in Kennedy's list may be the most consequential: a key that reached a server outside the approved destinations cannot be recalled, and treating it as exposed is the only conservative reading. The fix in 0.55.0 closes the gap going forward; it does not undo what an earlier version permitted.
Reporting based on original coverage from The Hacker News.
Sources
- The Hacker News Original source
- technical analysis Also reporting
- CVE record Also reporting
- release notes Also reporting
- credential documentation Also reporting
- file-copy flaw Also reporting
Continue Reading
WhatsApp Ties iPhone Login to an iOS Update
WhatsApp plans to log out and block users on vulnerable iOS versions, citing website-based attacks it has not publicly detailed.
The 18-Year Bug AI Found Twice
Google and Anthropic say their models independently caught an EDK II boot flaw years before humans did, as firmware updates lag behind the patch.
CISA Confirms AI-Fueled Attacks
US cyber agency says it has responded to multiple incidents involving agentic offensive frameworks used against federal and critical infrastructure targets.