When a user uploads a compressed archive into a container, a malicious image can execute arbitrary code with daemon (host root) privileges.
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.
Arbitrary code execution as host root, crossing the container-to-host trust boundary.
docker cp - or by calling the PUT /containers/{id}/archive API directly with compressed content.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.
PUT /containers/{id}/archive endpoint.{
"severity": "HIGH",
"github_reviewed_at": "2026-05-18T17:47:23Z",
"nvd_published_at": null,
"github_reviewed": true,
"cwe_ids": [
"CWE-427"
]
}