Skip to content

Docker Sandboxes macOS guest-to-host escape

Summary

Docker disclosed (security announcement September 15, 2026; reported by The Hacker News September 17) that CVE-2026-77179 (Critical) lets malicious code running inside a Docker Sandboxes VM on macOS escape the shared project directory and read or change files anywhere else on the host, running with the rights of the host account that runs the VM. Docker Sandboxes is Docker's per-agent isolation product: each AI coding agent gets its own small VM with only the project directory shared in, so the escaped code is, by design, whatever a prompt-injected agent installs and runs. The flaw is a time-of-check symlink confusion in the virtio-fs host server: the host-side file-share component followed symlinks when reopening a removed file from a stored path, so a guest could replace a parent directory with a symlink and then read/write as the VMM user, "potentially leading to code execution on the host." Fixed in Docker Sandboxes 0.42.0 (September 7); affected 0.28.0 up to 0.42.0 on macOS. The same release fixes CVE-2026-79994 (8.7 High): the socket relay checked a Unix-socket path was inside the workspace, then reconnected by path name, a guest swapping a directory for a symlink between check and connect made the host connect to any AF_UNIX socket outside the workspace, "exposing data or host-side capabilities provided by that socket" (affected 0.37.0-0.41.x). No exploitation reported; not KEV as of the September 16 catalog. Durable read: Docker's own docs say the hypervisor boundary "is the isolation control, not in-VM privilege separation", and this bug proves the boundary's file-sharing sidecar was the weak link, echoing GhostApproval's canonical-path lesson on-wiki.

Tags

Why this matters

  • The sandbox-for-agents product class is now a named attack surface. Every agent-isolation pitch rests on "the VM boundary is the control." The escape didn't break the hypervisor, it broke the file-share daemon that exists to cross the boundary by design. Any sandbox product with host-guest file sharing, socket relays, or path-passing APIs inherits this bug class: check the path, then re-open by path = re-check nothing.
  • Prompt-injected agent = the attacker in the guest. Docker's own framing: the code that escapes is "a coding agent that has been turned against its user, or anything malicious the agent installs and runs." The agent runs with sudo in-VM by design; in-guest privilege separation is explicitly NOT the control. That makes the shared-workspace transport the single choke point, and it failed.
  • Docker's docs have claimed since March that symlinks outside the workspace are not followed. The fix note confirms they were followed on reopen-from-stored-path. Documentation-level isolation claims and implemented isolation diverged for ~6 months, treat vendor isolation guarantees as version-pinned claims, verified against release notes.
  • Third boundary failure this month against AI-developer tooling, alongside AIR Plugin4Shell (marketplace SHA-pinning) and Unit 42's AgentCore Harness heap read (managed runtime): the pattern on-wiki is that the trust boundary around agents fails at its convenience component, plugin sync, credential vault, file sharing.

Mechanism (as published)

  • CVE-2026-77179 (Critical, CVSS per Docker): the virtio-fs host server, which serves the shared project directory into the VM, followed symlinks when reopening a removed file from a stored path. Guest-side: replace a parent directory with a symlink → host re-resolves through it → read/modify any host path reachable by the VMM user → potential host code execution. Fixed 0.42.0; affects 0.28.0-<0.42.0 on macOS.
  • CVE-2026-79994 (8.7 High): sandbox-to-host Unix-socket relay validated the socket path was within the authorized workspace, then reconnected using the path name; a directory-to-symlink swap between check and connect pointed the HOST at any AF_UNIX socket outside the workspace, data or host-side capability exposure through that socket. Affects 0.37.0-0.41.x; fixed same release.
  • CISA's added assessment on the CVE record: exploitation none; not in KEV as of catalog 2026.09.16.

Defender actions

  • Update Docker Sandboxes to ≥ 0.42.0 on macOS now if agents are run in it, the exploit needs only code execution inside the guest, which prompt injection supplies routinely.
  • For any agent-sandbox/vm-sharing product in your stack (including custom microVM runners): audit the host-side file-share and socket-relay components specifically for path re-resolution after validation, reopen by file descriptor, not by stored path; refuse symlinked parents at resolution time, not at check time.
  • Host-hygiene for agent Macs: the escape runs as the VMM user, keep agent development off accounts with SSH keys, cloud credentials, or keychains unlocked at that user; that converts "read host files" back into a contained blast radius.
  • Detection shape on macOS agent hosts: unexpected virtiofs-share-originated writes to paths outside mounted workspaces; docker sandbox version inventory.

Caveats

  • No in-the-wild exploitation reported; CISA added assessment says exploitation none.
  • Docker's CVSS numbers beyond Critical/8.7 labels were not captured in the relayed reporting; treat severity as vendor-labeled.
  • Only macOS is affected (the virtio-fs host server is the Apple-side implementation); Linux Docker Sandboxes architecture differs.
  • Whether other host-guest transports in Docker Sandboxes were audited is not public.

Sources