Moby and Docker Engine archive upload flaw enables host-root code execution

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-41567?

CVE-2026-41567 is a vulnerability classified as Uncontrolled Search Path Element, affecting moby/v2/daemon (affected versions: < 2.0.0-beta.14), Docker Engine (affected versions: < 29.5.1), and docker/daemon (affected versions: <= 28.5.2). This vulnerability is rated High, with a CVSS score of 7.5. Current sources do not report this vulnerability as exploited.

Overview

Original source data

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

Affected products and scope

  • Docker Engine: affected for versions < 29.5.1; the Moby advisory identifies 29.5.1 as the patched version.
  • moby/moby/v2/daemon: affected for versions < v2.0.0-beta.14; the identified patched version is v2.0.0-beta.14.
  • github.com/docker/docker/daemon: affected for versions <= v28.5.2. The advisory does not identify a patched version for this legacy package path, so a fixed status should not be inferred for another release on the same path.

These boundaries apply to daemons that decompress compressed archives using binaries resolved from the container filesystem. Ordinary docker cp usage with uncompressed tar is outside the affected path described by the advisory.

Technical details

Moby and Docker Engine use external binaries to decompress archives when processing compressed archive uploads into containers. Because operations occur in the wrong order, the daemon resolves decompression binaries such as xz or unpigz from the container filesystem instead of the host environment. If a malicious image contains a trojanized decompression binary, that binary can be executed with the daemon's host root UID and unrestricted capabilities. The documented preconditions are a container created from a malicious image and an xz or gzip compressed archive upload through PUT /containers/{id}/archive or docker cp -. The weakness is classified as CWE-427, Uncontrolled Search Path Element. Further internal implementation details, such as the exact selection and invocation mechanism for each decompression binary, are not established by the available evidence.

Exploitability

The documented attack path is local and requires access sufficient to run a container from a malicious image and initiate an archive upload into that container. A user must perform or permit the compressed archive upload, so the issue is not automatically exploitable merely by running an ordinary container. The specific path involves xz or gzip archives that invoke external binaries; standard docker cp usage is not affected because the CLI sends uncompressed tar by default. The advisory also states that bzip2, zstd, and gzip when the image does not contain an unpigz binary use pure Go implementations and are not affected by the described path. The record marks public_exploit as false and does not establish a known_exploited status; this is a reporting status, not proof that systems are safe or have not been exploited.

Technical impact

The flaw allows an image-provided decompression binary to execute in the daemon's security context rather than in a container-restricted context. The technical result can be arbitrary code execution with the host root UID and unrestricted capabilities, changing the impact scope from the container to the host.

Possible consequences include access to data or secrets available to the daemon, modification of host files and configuration, compromise of other workloads, or service disruption. The actual impact depends on whether a malicious image is run and whether a user performs the compressed archive upload required by the documented path. Merely running a normal image or using an uncompressed archive does not satisfy all of the stated exploitation conditions.

Business impact

A malicious container image can cross the container-to-host trust boundary when a user uploads a compressed archive into that container. If exploitation succeeds, code running with daemon privileges may read or modify host data, affect system integrity, and disrupt container workloads.

In shared-daemon environments, the consequences could extend to other containers, secrets, volumes, or services reachable by the daemon. This is a possible consequence of host-root access and unrestricted capabilities, not evidence of a specific compromise. Risk is reduced by running only trusted images, restricting archive-upload access, and avoiding compressed archive transfers into containers created from untrusted images.

Remediation

  1. For affected Docker Engine deployments, upgrade to the exact patched version 29.5.1.
  2. For moby/moby/v2/daemon deployments, upgrade to the exact patched version v2.0.0-beta.14.
  3. For the legacy github.com/docker/docker/daemon package path in the <= v28.5.2 range, the advisory does not identify a separate patched release. Follow a vendor-supported upgrade path to a branch with an explicitly documented fix, and verify the actual daemon package after upgrading. Do not assume that an unverified release is fixed.
  4. Until upgrading, run containers only from trusted images, use an authorization plugin to restrict access to PUT /containers/{id}/archive, and avoid piping xz or gzip archives into containers created from untrusted images.
  5. Ordinary docker cp use does not require a change when the CLI sends uncompressed tar by default, but every workflow that explicitly supplies compressed input should be reviewed.

Detection

  1. Inventory running Docker and Moby daemons, identifying the implementation, package path, and release branch so they can be compared with the affected ranges.
  2. Identify workloads that use PUT /containers/{id}/archive or docker cp -, especially when the input is an xz or gzip archive.
  3. Review the provenance and contents of images used by those workloads, focusing on the presence of xz or unpigz binaries in the image filesystem.
  4. Review audit, reverse proxy, or daemon access logs for requests to PUT /containers/{id}/archive and for compressed archive transfers. This is supplementary detection guidance, not a confirmed IOC.
  5. If an affected daemon processed a compressed archive in a container from an untrusted image, investigate host telemetry for daemon child-process execution, file changes, data access, or use of privileged capabilities. The available evidence does not identify a specific log event or IOC, and absence of log evidence does not prove that the system is safe.
Sources (25)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.