github.com/moby/moby/v2
Affected
- introduced
0, fixed2.0.0-beta.14(semver)
Fixed versions
2.0.0-beta.14
Fix
- Fixed version
2.0.0-beta.14go get github.com/moby/moby/[email protected]
Advisory
Also known as: CVE-2026-41567, GO-2026-5746
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
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
PUT /containers/{id}/archive endpoint.High Basis: The source's own band: HIGH
0, fixed 2.0.0-beta.14 (semver)2.0.0-beta.14
2.0.0-beta.14go get github.com/moby/moby/[email protected]0, last affected 28.5.2 (semver)None listed
No fixed version is listed.
0, last affected 28.5.2 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0