CVE-2026-41567: Docker: `PUT /containers/{id}/archive` executes container binary on the host
Summary
When a user uploads a compressed archive into a container, a malicious image can execute arbitrary code with daemon (host root) privileges.
Details
When handling PUT /containers/{id}/archive requests with compressed archives, the daemon decompresses them using external system binaries. Due to incorrect ordering of operations, these binaries are resolved from the container's filesystem rather than the host's. A container image that includes a trojanized decompression binary can achieve code execution as the daemon process whenever a compressed archive is uploaded to that container.
The executed binary runs with the daemon's full privileges, including host root UID and unrestricted capabilities.
Impact
Arbitrary code execution as host root, crossing the container-to-host trust boundary.
Conditions for exploitation
- A user must run a container from a malicious image that contains a trojanized decompression binary. - The user must then upload a compressed archive (xz or gzip) into that container, either by piping a compressed archive via docker cp - or by calling the PUT /containers/{id}/archive API directly with compressed content.
Not affected
Standard docker cp usage is not affected, because the CLI sends uncompressed tar by default:
docker cp ./file.txt mycontainer:/file.txt
This can only be exploited when explicitly passing a xz or gzip-compressed archive to docker cp or the PUT /containers/{id}/archive API, for example:
cat archive.tar.xz | docker cp - mycontainer:/dir
Decompression formats using pure Go implementations (bzip2, zstd, and gzip when the container image does not contain an unpigz binary) are also not affected.
Workarounds
- Only run containers from trusted images. - Use authorization plugins to limit access to the PUT /containers/{id}/archive endpoint. - Avoid piping compressed archives into containers created from untrusted images.
Other sources
Moby is an open source container framework. In versions prior to 29.5.1 and in moby/moby v2 prior to v2.0.0-beta.14, when a compressed archive is uploaded to a container via PUT /containers/{id}/archive or piped through docker cp -, the daemon resolves decompression binaries (such as xz or unpigz) from the container's filesystem rather than the host's due to incorrect ordering of operations. A malicious container image containing a trojanized decompression binary can achieve arbitrary code execution with full daemon privileges, including host root UID and unrestricted capabilities, when a user uploads a compressed (xz or gzip) archive into that container. This issue is fixed in Docker Engine 29.5.1 and moby/moby v2.0.0-beta.14. Workarounds include only running containers from trusted images, using authorization plugins to restrict access to the PUT /containers/{id}/archive endpoint, and avoiding piping compressed archives into containers created from untrusted images
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/moby/moby/v2to a version that resolves this vulnerability.Fixed in 2.0.0-beta.14 - Upgrade
Upgrade
alpine/dockerto a version that resolves this vulnerability.Fixed in 29.5.1-r0 - Upgrade
Upgrade
Docker Engineto a version that resolves this vulnerability.Fixed in 29.5.1 - Upgrade
Upgrade
moby/mobyto a version that resolves this vulnerability.Fixed in v2.0.0-beta.14 - Configuration
Use an authorization plugin to limit access to the `PUT /containers/{id}/archive` endpoint so only trusted callers can upload archives into containers.
Docker daemon API authorization (authorization plugin) for PUT /containers/{id}/archive = restrict - Configuration
Only run containers from trusted images to reduce the risk of trojanized decompression binaries being present in the container filesystem.
Container workflow container image trust (only trusted images) = only trusted images - Configuration
Avoid piping compressed archives into containers created from untrusted images (e.g., `cat archive.tar.xz | docker cp - mycontainer:/dir` and similar workflows).
Container workflow archive piping into containers from untrusted images = avoid
Event History
Frequently Asked Questions
What is the severity of CVE-2026-41567?
CVE-2026-41567 is considered a critical vulnerability due to its ability to execute arbitrary code with daemon privileges.
How do I fix CVE-2026-41567?
To remediate CVE-2026-41567, upgrade to a version of Moby or Docker that is newer than 28.5.2 or use version 2.0.0-beta.14.
What types of software are affected by CVE-2026-41567?
CVE-2026-41567 affects Moby and Docker versions up to and including 28.5.2.
What kind of attack is possible with CVE-2026-41567?
CVE-2026-41567 allows a malicious user to upload a compressed archive that can trigger arbitrary code execution on the host with root privileges.
Is CVE-2026-41567 exploitable through normal user actions?
Yes, CVE-2026-41567 can be exploited when a user uploads a compressed archive to a container.