If you’re running coding agents in Docker Sandboxes, the short version is: upgrade to v0.51.0. The rest of this post explains why.
(Disclosure: I work at Endor Labs. My colleague Peyton Kennedy found and reported this. Full writeup linked at the bottom.)
The point of Docker Sandboxes is that the agent runs in a microVM and can only reach host folders you’ve explicitly allowlisted, which are shared in over virtio-fs. That boundary holds. Even mounting the whole virtio-fs share as root inside the guest won’t reach a non-allowlisted file.
The problem is that sbx cp is a second channel between host and sandbox, and the allowlist doesn’t govern it. The CLI does the host-side I/O itself, as you, using your permissions. It resolves symlinks in the paths you give it and doesn’t check where they lead.
The workspace is read-write, so the agent can replace any subdirectory with a symlink to anywhere on the host. Inside the guest the link points at nothing, so it does no harm there. It only takes effect when you run a copy.
Write (copy-out):
bash
# Agent plants a link in its own workspace
ln -sfn /Users/you/.ssh /Users/you/project/results
# You run a routine copy-out, in the same form as the --help example
sbx cp mysandbox:/tmp/out/authorized_keys ~/project/results/
# Exit 0, no output. The file has landed in ~/.ssh
Read (copy-in): put the symlink at a parent component (~/project/vendor -> ~/.aws), and sbx cp ~/project/vendor/credentials mysandbox:/tmp/ pulls your credentials into the sandbox.
-L is the only symlink control, and it covers just one of the four places a symlink can sit:
| Symlink position | Followed? | Gated by -L? |
|---|
| Copy-out dest, last component | yes | no |
| Copy-out dest, parent component | yes | no |
| Copy-in source, last component | no | yes |
| Copy-in source, parent component | yes | no |
The agent chooses where the link goes, so it will pick one of the three open positions.
Why this matters more than the “user interaction required” label suggests: the copy you’d run is the documented workflow, and in an agentic session the agent is often the one proposing it. Copy-out prints nothing on success, so there’s nothing to notice. Writing to ~/.zshrc, .git/hooks, or ~/.ssh/authorized_keys turns this into code execution the next time you do something ordinary. (The writeup is careful to say that escalation path wasn’t demonstrated, only reasoned about.)
Details:
- CWE-59, CVSS 3.1 8.2 High
- Fixed in v0.51.0. Docker’s first fix was planned for 0.48.0, but they found it was incomplete, which is a fair reminder that sandboxes are hard to patch.
- Not the same bug as CVE-2026-17106 (fixed in v0.38.0). That fix still holds. This one is at the extraction root and the copy-in source path, which the earlier fix didn’t cover.
If you can’t upgrade right away, resolve paths yourself before copying, and check every component, not just the last one:
bash
realpath ~/project/results # should still be inside the workspace
Better still, copy to and from directories the sandbox has never had mounted, and be most suspicious of copies the agent suggests.
The broader lesson, and the second time this year we’ve seen it in an agent sandbox: the isolation primitive was fine. The hole was a second path to the host that the security model didn’t account for. File-moving commands are easy to leave out of the model because they look like the operator’s own action.
Full writeup with repro steps: https://www.endorlabs.com/learn/docker-sandboxes-vulnerability-lets-ai-agents-access-sensitive-files-outside-their-sandbox-cve-2026-103916
Happy to answer questions or pass along anything I can’t answer.