{"schema_version":"1.7.5","id":"GHSA-x86f-5xw2-fm2r","published":"2026-05-18T17:47:23Z","modified":"2026-06-25T23:11:18.225459650Z","aliases":["CVE-2026-41567","GO-2026-5746"],"related":["CGA-37fr-7h3x-r97v"],"summary":"Docker: `PUT /containers/{id}/archive` executes container binary on the host","details":"## Summary\n\nWhen a user uploads a compressed archive into a container, a malicious image can execute arbitrary code with daemon (host root) privileges.\n\n## Details\n\nWhen 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.\n\nThe executed binary runs with the daemon's full privileges, including host root UID and unrestricted capabilities.\n\n## Impact\n\nArbitrary code execution as host root, crossing the container-to-host trust boundary.\n\n### Conditions for exploitation\n\n- A user must run a container from a malicious image that contains a trojanized decompression binary.\n- 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.\n\n### Not affected\n\nStandard `docker cp` usage is **not** affected, because the CLI sends uncompressed tar by default:\n\n```\ndocker cp ./file.txt mycontainer:/file.txt\n```\n\nThis 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:\n\n```\ncat archive.tar.xz | docker cp - mycontainer:/dir\n```\n\nDecompression formats using pure Go implementations (bzip2, zstd, and gzip when the container image does not contain an `unpigz` binary) are also not affected.\n\n## Workarounds\n\n- Only run containers from trusted images.\n- Use authorization plugins to limit access to the `PUT /containers/{id}/archive` endpoint.\n- Avoid piping compressed archives into containers created from untrusted images.","affected":[{"package":{"name":"github.com/moby/moby/v2","ecosystem":"Go","purl":"pkg:golang/github.com/moby/moby/v2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0-beta.14"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-x86f-5xw2-fm2r/GHSA-x86f-5xw2-fm2r.json"}},{"package":{"name":"github.com/docker/docker","ecosystem":"Go","purl":"pkg:golang/github.com/docker/docker"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"28.5.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-x86f-5xw2-fm2r/GHSA-x86f-5xw2-fm2r.json"}},{"package":{"name":"github.com/moby/moby","ecosystem":"Go","purl":"pkg:golang/github.com/moby/moby"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"28.5.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-x86f-5xw2-fm2r/GHSA-x86f-5xw2-fm2r.json"}}],"references":[{"type":"WEB","url":"https://github.com/moby/moby/security/advisories/GHSA-x86f-5xw2-fm2r"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41567"},{"type":"PACKAGE","url":"https://github.com/moby/moby"}],"database_specific":{"cwe_ids":["CWE-427"],"github_reviewed":true,"github_reviewed_at":"2026-05-18T17:47:23Z","nvd_published_at":"2026-06-05T02:17:13Z","severity":"HIGH"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N"}]}