CopyEscape
CopyEscape is an arbitrary-file-write vulnerability in moby/go-archive versions before 0.3.0, affecting Unpack, UnpackLayer, Untar, UntarUncompressed, and ApplyLayer helpers. The extraction routines rely on lexical path checks without ensuring that operating-system path resolution remains confined to the destination directory. Archive-introduced links can therefore redirect subsequent filesystem operations outside that directory. In affected Docker copy workflows, a malicious running container can exploit a filesystem race during archive generation to produce entries that abuse unsafe symlink handling during local extraction. The vulnerability affects Docker container-to-host copying and Docker Sandboxes file retrieval, permitting file creation or overwrite with the extracting process's permissions.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation compromises filesystem integrity outside the intended extraction destination. In Docker copy workflows, writes occur on the client host with the invoking user's permissions, including on macOS despite Docker Desktop's virtual-machine isolation. Overwriting executable or configuration files can enable persistence, subsequent code execution, or service disruption. Privileged Linux copy operations can permit system-file replacement and root-level code execution; a demonstrated exploit replaced a container-runtime executable that Docker subsequently invoked as root. These consequences depend on writable targets and subsequent use of overwritten files, rather than directly granting the malicious container Docker daemon privileges.
If you can’t patch tonight, do this now.
Until patched, process only trusted archives and avoid copying files from untrusted or compromised running containers or sandboxes. Stopping a container before copying prevents the demonstrated live-filesystem race, but does not make arbitrary malicious archives safe for vulnerable extraction routines. Avoid privileged docker cp operations and remove unnecessary elevated permissions from artifact-collection jobs. Retrieve suspicious container data only within isolated, disposable environments.
Patch, then assume compromise.
Upgrade moby/go-archive to version 0.3.0 or later and rebuild applications that embed the vulnerable library. Upgrade affected Docker Engine and CLI installations to version 29.7.2 or later, Docker Desktop to 4.86.0 or later, and Docker Sandboxes to 0.38.0 or later. For distribution-managed Docker, Podman, and other affected packages, install the applicable vendor security updates; Amazon Linux 2 Docker packages include fixes in 25.0.18-1.
2 exploits validated by Mallory's analysis. Hidden: 3 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
82 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.