Skip to content
Beta
All articles

Docker Sandboxes CVE-2026-103916: why sbx cp needed a third fix

A symlink planted by an agent inside a Docker sandbox could turn a later sbx cp into a host file read or write. What was fixed in 0.51.0 and what to do now.

By The SpanDock team

5 min read

A diagram of a sandbox workspace mounted from the host, where an agent plants a symbolic link, and a later sbx cp command run by the user follows that link to a file elsewhere on the host

Docker Sandboxes run a coding agent in its own microVM so that it can install packages, run tests and edit files without touching the rest of your machine. On 3 November 2026 a vulnerability was published in the one command that deliberately crosses that boundary: sbx cp, which copies files between the host and a sandbox. Tracked as CVE-2026-103916, it let an agent inside the sandbox plant a symbolic link that a later, user-initiated copy would follow onto the host. Versions 0.28.0 up to, but not including, 0.51.0 are affected, and v0.51.0 is the release to run.

This article explains how the flaw worked, why it took three releases to close, and what teams that hand work to sandboxed agents should change in how they copy files out.

What the flaw was

A Docker sandbox usually has a workspace directory that is mounted from the host, so both sides can see the same files. The agent can create anything it likes in that directory, including symbolic links. According to the write-up by Endor Labs, whose researcher Peyton Kennedy reported it, sbx cp resolved paths in that shared directory without checking where a link really pointed. That gave two outcomes:

  • Reading host files into the sandbox. If the agent placed a link where the user later copied from, the copy could pull a file from elsewhere on the host into the sandbox, where the agent could read it.
  • Writing sandbox data onto the host. If the link sat where the user copied to, the copy could write into a host path of the agent's choosing, with the user's own permissions.

Endor Labs adds detail that matters for judging the risk. The -L flag, which asks sbx cp to follow links, only governed one of the four places a link could sit, so leaving it off was not a defence. A copy out of the sandbox printed nothing unusual. Writes were limited to directories that already existed, but that still meant the whole home directory. Reads needed the agent to guess a file name, which is not hard for well-known paths such as shell profiles, cloud credentials or SSH configuration.

Nothing happens until a person runs sbx cp, so this is not an escape the agent can trigger alone. In practice that is a weak comfort: copying results, logs or build artefacts out of a sandbox is exactly what people do at the end of a task, and an agent that has been steered by a prompt injection can suggest the copy itself.

Three fixes in three weeks

The CVE covers the last of a series of fixes to the same command, and the Docker release notes show the sequence:

ReleaseDate (2026)What changed in sbx cp
0.48.013 OctoberBlocks local paths that escape a sandbox workspace through symbolic links
0.50.026 OctoberRejects links that escape when the workspace is reached through an alternate host path
0.51.03 NovemberBlocks links in mounted directories from escaping onto other host paths; on Windows, also blocks escapes through substituted drives

Endor Labs says the fix was originally expected in 0.48.0 and was found to be incomplete. That is a familiar pattern with link handling: each check closes one route, and the next report finds a path that reaches the same file another way, through a different mount point, a drive letter alias or a link in a different position. The 0.51.0 notes also add an ownership check on the daemon's Unix socket, which is a separate hardening change.

At the time of writing, the Docker documentation page stops at 0.50.0, while the GitHub release for 0.51.0 was published on 3 November. If you check versions against the documentation alone, you will not see the release that closes the CVE.

Endor Labs also notes an earlier, related flaw, CVE-2026-17106, fixed in 0.38.0. Teams on very old builds have more than one reason to update.

How severe it is

The sources agree that it is high, but not on the exact score. Docker, as the numbering authority, rates it 8.4 under CVSS 4.0, with local access, user interaction required and high impact on confidentiality, integrity and availability. Endor Labs gives 8.2 under CVSS 3.1 and 7.3 under CVSS 4.0. All three land in the high band, and none is critical. The weakness class is CWE-59, improper link resolution before file access. At the time of writing the US National Vulnerability Database lists the record as awaiting analysis, so expect its own score to appear later.

The scores understate one thing: the attacker is assumed to be the agent, or whatever has managed to instruct it. For teams that adopted sandboxes precisely because they do not fully trust agent behaviour, the question is less "how likely is a malicious agent" and more "does the boundary hold when it is tested", and until 0.48.0 this one did not fully hold.

What it means for engineering and security leaders

Sandboxes move the risky part of agent work into a separate environment, but every sandbox has deliberate holes: mounted directories, copy commands, network rules and forwarded credentials. The NCSC's sandbox maturity levels and our overview of what built-in sandboxes do and don't cover both make the same point: the boundary is only as strong as the channels that cross it.

A shared, writable workspace is the most convenient of those channels and the hardest to reason about. Anything the agent can create there, including links, special files and names chosen to look harmless, becomes input to tools that run on the host with your permissions.

Practical takeaways

  • Update to 0.51.0 or later on every machine that runs Docker Sandboxes, and check the installed version against the GitHub releases rather than the documentation page.
  • Prefer copying to and from directories that were never mounted into a sandbox. A fresh, empty target directory leaves nothing for a planted link to redirect.
  • Resolve paths before copying. Running realpath on a source or target inside a shared workspace shows where it really leads.
  • Treat agent-proposed copies as untrusted. If an agent asks you to copy a particular file out, or to copy something into a particular location, look at the path first.
  • Inventory what lives in your home directory that a write could damage: shell start-up files, git hooks, editor and agent settings. Those are the files a host write would target.
  • Watch for further fixes. Link handling has needed three passes here; it would be prudent to follow the release notes for the next few versions.

Sources

  1. Endor Labs: Docker Sandboxes vulnerability lets AI agents access sensitive files outside their sandbox (CVE-2026-103916)
  2. Docker Sandboxes v0.51.0 release notes
  3. Docker Docs: Docker Sandboxes release notes
  4. CVE-2026-103916 record
Cookie categories

Details: Cookie Policy.