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.
Published May 18, 2026 · Updated Jun 9, 2026
Affected packages
github.com/moby/moby/v2
- Ecosystem
- Go
- Affected
- < 2.0.0-beta.14
- Fixed in
- 2.0.0-beta.14
- Check
go list -m github.com/moby/moby/v2
github.com/docker/docker
- Ecosystem
- Go
- Affected
- <= 28.5.2
- Fixed in
- No patched version yet
- Check
go list -m github.com/docker/docker
github.com/moby/moby
- Ecosystem
- Go
- Affected
- <= 28.5.2
- Fixed in
- No patched version yet
- Check
go list -m github.com/moby/moby
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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 thePUT /containers/{id}/archiveAPI 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.txtThis 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:/dirDecompression 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}/archiveendpoint. - Avoid piping compressed archives into containers created from untrusted images.
Credited to manizada, vvoland.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-41568
Docker: Race condition in docker cp allows creation of arbitrary empty files on the host via symlink swap
medium6.1No fixMay 18, 2026CVE-2026-42306
Docker: Race condition in docker cp allows bind mount redirection to host path
high7.2No fixMay 18, 2026CVE-2026-33997
Moby has an Off-by-one error in its plugin privilege validation
medium6.8No fixMar 27, 2026CVE-2026-34040
Moby has AuthZ plugin bypass when provided oversized request bodies
high8.8Mar 27, 2026CVE-2025-54388
Moby firewalld reload makes published container ports accessible from remote hosts
medium4.6Jul 29, 2025CVE-2025-54410
Moby firewalld reload removes bridge network isolation
low3.3Jul 29, 2025
