Docker 29.10.1 Closes the docker cp Read-Only Mount Race

Docker Engine 29.10.1, released November 24, fixes CVE-2026-135124: a container process could redirect read-only flags during docker cp and write into a host directory that was supposed to be protected. Check your version, patch, and stop copying into untrusted containers.

Before you start

Compatible with Ubuntu 24.04 LTS and 22.04 LTS (docker-ce package), Debian 12 bookworm and 13 trixie (docker-ce package), RHEL 8, 9, and 10 (docker-ce package)

  • SSH or console access to a host running Docker Engine
  • Permission to upgrade packages and restart the Docker daemon
  • A list of the containers that use read-only bind mounts

Docker Engine 29.10.1 arrived on November 24, 2026, and it carries a fix that deserves attention from anyone who runs containers with read-only bind mounts. The headline flaw is CVE-2026-135124, published as GitHub advisory GHSA-vfmq-r373-x89f on the same day. A process inside a running container could redirect the read-only flags applied during a docker cp operation, so files copied into the container landed in a host directory that was meant to stay protected. The release also fixes a second flaw, CVE-2026-135844, plus a set of smaller bugs. This article explains the race in plain steps, shows who is exposed, and gives the exact commands to check a host and patch it.

What 29.10.1 fixes and why it matters

The Docker Engine 29 release notes list version 29.10.1 as dated November 24, 2026. Two security fixes sit at the top of that entry. The first is CVE-2026-135844, an unbounded read when Docker parses user, group, and ID mapping files, tracked as GHSA-ffh6-8jcg-cjmw. A parser that reads without a bound can consume far more input than the caller expects, and that kind of flaw belongs in the same patch window as the main fix. The second is CVE-2026-135124, the docker cp read-only mount race, tracked as GHSA-vfmq-r373-x89f. That second flaw is the reason to patch promptly, because it turns a routine file copy into a write path into a protected host directory.

The rest of the 29.10.1 entry is a set of reliability fixes. Image builds could fail with the message “http: invalid Read on closed Body” when a build context was uploaded with the Expect: 100-continue header, and that failure is fixed. The default AppArmor profile could block processes in the same container from signalling or tracing each other on hosts with kernel.apparmor_restrict_unprivileged_unconfined=1, and that behavior is fixed. The docker login output now mentions OATs as an additional authentication mechanism. BuildKit moves to v0.35.1. A docker network rm problem is fixed, along with a Swarm endpoint race. None of those items changes a security posture on its own. They matter here because they show the shape of a normal patch release, and the two CVE fixes sit inside it. A host that skips 29.10.1 for convenience keeps both flaws.

The timing also matters for context. Version 29.10.0, dated November 16, 2026, changed how Docker treats loopback registries. If insecure-registries is explicitly configured, Docker no longer automatically treats loopback addresses such as 127.0.0.0/8 and ::1/128 as insecure registries. That change is covered in the site’s own article on the 29.10 loopback registry fix. Readers who already moved to 29.10.0 for that change still need 29.10.1, because the docker cp race was present in 29.10.0 and the fix landed only in 29.10.1. The AICassindra analysis, published November 27, 2026, gives the same dates and the same advisory identifiers, and it walks through the mechanism in detail. The next section follows that walkthrough.

A read-only bind mount is a common guard. An operator mounts a host directory into a container with the read-only flag so the workload can read configuration or data while the host copy stays untouched. The flag is part of the trust model for that host. When a copy operation can silently drop the flag, the guard fails at the exact moment files move. That is why this flaw ranks above an ordinary bug fix, even though the attacker needs a specific setup to reach it. The patch is small, the upgrade path is a normal package upgrade, and the check takes one command. There is little reason to leave a host on an older 29.x build once the fixed release is out.

How the race works, step by step

The copy path starts when an operator or an API client copies files into a running container. The command is docker cp, and the API form is PUT /containers/{id}/archive. The Docker daemon builds a temporary view of the container filesystem, with the container volumes bind-mounted into that view, and then extracts the archive inside it. The AICassindra analysis describes this sequence in full, and the steps below follow that description.

The daemon must apply the read-only flags of those bind mounts while it prepares the temporary view. In the old code, the daemon opened the mount target through os.Root. A descriptor names a directory directly, so a rename after the open cannot redirect it. The daemon performed the bind through the /proc/self/fd/N path for that descriptor. That part was sound. The problem came at the next step. The kernel rejects remount and propagation-change syscalls when the target is a /proc/self/fd path. To apply the read-only flag, the old code called readlink to turn the descriptor path into an ordinary path string, such as /vol/b/ro, and then remounted read-only by that string. The string names a path, and a path can change between one syscall and the next.

That gap is the whole flaw. Between the readlink call and the remount, a process inside the container can rename an ancestor directory. The check and the use happen at different times, and the path means something different at the second time than it did at the first. Engineers call this pattern a time-of-check to time-of-use bug, often shortened to TOCTOU. The name sounds abstract. The effect is concrete. The daemon looked up a path, confirmed it led to the read-only mount, and then applied the flag to whatever the path led to a moment later. If the path had moved, the flag landed on the wrong mount.

The integration test added with the fix makes the shape easy to picture. The setup has a writable bind at /vol. Under it sit two directories. One is /vol/a/ro, a decoy writable bind. The other is /vol/b/ro, the real read-only bind. A process inside the container swaps /vol/a and /vol/b in a tight loop, over and over, while the copy runs. Most swaps land harmlessly. If one swap lands in the narrow window between readlink and the remount, the string /vol/b/ro now leads to the decoy. The daemon remounts the decoy read-only. The real read-only bind keeps its writable state for the duration of the copy. Files from the archive can then be created or overwritten in the host directory behind that mount, which was meant to stay protected.

The fix changes the order of operations so the container has nothing to rename at the risky moment. It landed in moby/moby pull request 54279, the 29.x backport of pull request 54278, merged on November 24. The new sequence lives in daemon/containerfs_linux.go, and the AICassindra analysis lays out each step. The daemon creates a stub directory, or a stub file for file mounts, in its own private temporary directory, outside anything the container can reach. It bind-mounts the source onto that stub. It applies the read-only remount, the private propagation flag, and the recursive read-only flags to the stub by its private path. It opens the target inside the container view through os.Root. Then it moves the finished mount from the stub onto the target descriptor with MS_MOVE. Every step that needs a path uses a path the container cannot rename. The mount arrives at its destination already read-only, and the window between the lookup and the flag is gone.

Who is actually exposed and who is not

Exposure depends on three conditions, and all three must hold at the same time. The advisory lists them plainly, and the AICassindra analysis repeats them. A host that meets only one or two of them is in a weaker position than a host that meets all three.

The first condition is that the container has at least one read-only bind mount. Without a read-only bind mount, there is no protected host directory for the race to reach. A container with only writable volumes, or with only named volumes and no bind mounts, does not offer the flaw a target. The check for this condition is a container inventory. List the containers on each host, inspect their mounts, and note which ones carry the read-only flag. That list is also the patch priority list, because those containers are the ones the fix protects.

The second condition is that a process inside the running container can modify a path leading to that mount destination. The container needs write access to an ancestor directory of the mount point, so it can rename that ancestor during the copy. A container that runs a trusted image, with no untrusted code and no shell access for untrusted users, meets this condition only weakly. A container that runs untrusted workloads, accepts arbitrary code, or hosts multiple tenants meets it directly. The distinction matters for triage. A single-purpose container running a pinned image from a trusted registry is a different risk from a shared build container or a notebook container where users run code they supply themselves.

The third condition is that someone copies files into that container with docker cp or the archive PUT endpoint. The container process cannot start the copy on its own. The copy starts when an operator, a script, or an API client runs it. That means the exposure window opens only during copies, and it opens because of an action on the host side. A host that never copies files into running containers with read-only bind mounts never opens the window, even if the first two conditions hold. A host that copies files into such containers as part of a regular workflow opens it often.

Rootless Docker Engine is affected by the same flaw, with a narrower impact. The daemon runs as an unprivileged user, so the files the race can reach are limited to files that user can access. That limit is real, and it is also easy to overstate. A rootless daemon user that owns application data, configuration directories, or shared volumes can still lose the protection those directories relied on. Rootless mode reduces the blast radius. It does not remove the flaw.

Several setups are outside the flaw entirely. Containers without read-only bind mounts are outside it. Stopped containers are outside it, because the race needs a running process to rename the path during the copy. Copies out of a container are outside it, because the GET and HEAD methods on the archive endpoint do not build the same writable temporary view. A team that only ever copies files out of containers, and never into them, does not trigger the vulnerable path.

The impact is bounded in two ways, and both bounds deserve a clear statement. The process inside the container does not choose the content that gets written. That content comes from the archive supplied by whoever runs the copy. The process also cannot start the copy. Those bounds limit the flaw to a redirection of a copy that someone else already decided to run. The bound does not make the flaw harmless. Written files persist after the copy ends. If the protected host directory holds configuration that the host or another container trusts, an archive that contains an unexpected file name can still do damage. A single unexpected file in a trusted configuration directory can change how a service starts, what it loads, or what it serves. The patch removes that path. Until the patch lands, the workarounds in a later section close the window.

How to check and patch

Start with the version on each host. One command prints the server version, which is the number that matters here. The client version can differ, and the fix lives in the daemon.

docker version --format '{{.Server.Version}}'

Compare the output with the fixed release. Version 29.10.1 or later contains the fix, according to the Docker Engine 29 release notes. Any 29.10.0 or earlier 29.x build needs the upgrade. Older major lines need their own fixed release, so check the release notes for the line in use before assuming a version number is safe. A host that reports a version below 29.10.1 goes on the patch list. A host that already reports 29.10.1 or later is done, and the remaining steps in this section serve as a record for the next patch cycle.

List the containers that use read-only bind mounts before the upgrade, so the restart plan covers them. The inspect output shows each mount and its read-only flag.

docker inspect --format '{{json .Mounts}}' <container-name>

Replace <container-name> with the name or ID of each container on the host. Note the containers that show a bind mount with the read-only flag set. Those containers need a restart of the daemon underneath them, and their workloads need a restart window. The upgrade itself is a package upgrade, and the daemon restart that follows it is the step that puts the fixed code in place. A package upgrade without a daemon restart leaves the old daemon running.

On Debian and Ubuntu, upgrade the Docker packages with apt. The command below upgrades the engine, the CLI, the container runtime, and the Buildx and Compose plugins together, so the set stays consistent.

sudo apt update
sudo apt install --only-upgrade docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

On RHEL, upgrade the same set with dnf.

sudo dnf upgrade docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Restart the daemon after the packages install. The restart applies the fixed binary and reloads the daemon configuration.

sudo systemctl restart docker

Verify the version again after the restart, with the same command used at the start of this section.

docker version --format '{{.Server.Version}}'

Confirm that the containers came back. List running containers, check the ones with read-only bind mounts, and confirm their mounts still show the read-only flag. A patch cycle that ends without this check leaves the most important question unanswered. The same discipline applies to kernel patches, where a reboot is the step that applies the fix. The site’s Ubuntu kernel patch and reboot guide walks through that pattern for USN-9173 and USN-9183, and the lesson carries over here. A package install is a step. The restart is the step that makes it live.

One more configuration note belongs in this section. Version 29.10.0 changed loopback registry handling, as described in the Docker Engine 29 release notes. If insecure-registries is explicitly configured, Docker no longer automatically treats loopback addresses as insecure registries. A host that pulls from a local registry on 127.0.0.1 may need an explicit entry in /etc/docker/daemon.json. The file below shows the shape of that entry. Edit the file only if the host uses a loopback registry, then restart the daemon.

{
  "insecure-registries": ["127.0.0.1:5000"]
}

Hosts that do not use a loopback registry need no change here. The entry above is a configuration example, and the registry address in it must match the registry the host actually uses.

What to do if you cannot patch yet

Some hosts cannot restart the Docker daemon right away. A long build may be running, a maintenance window may be days out, or a change freeze may cover the fleet. The advisory offers workarounds for that gap, and the AICassindra analysis lists the same three. Each one closes the copy window in a different way, and each one is a stopgap. The patch remains the fix.

The first workaround is to stop copying files into running containers that run untrusted workloads. The race needs a copy into a running container. If the copy does not happen, the window does not open. Route the files another way for the duration of the freeze. Deliver inputs before the workload starts, through a volume prepared by a trusted process, or rebuild the image with the files inside it. That route keeps the files moving while the daemon stays on the old build.

The second workaround is to stop the container before copying files into it. A stopped container has no running process to rename the path during the copy. Copy the files, then start the container again. This workaround fits containers that can tolerate a short stop. It does not fit containers that must stay up, and it adds a restart to every copy, so treat it as a manual procedure for a small number of containers rather than a fleet policy.

The third workaround is to use an authorization plugin to restrict PUT /containers/{id}/archive. The plugin sits between API clients and the daemon, and it can deny archive uploads to containers that carry read-only bind mounts. This workaround fits hosts where the daemon socket is exposed to automation or to multiple users. It needs a plugin that the team already runs or can deploy, and it needs a policy that names the containers it protects. A plugin that is misconfigured can block legitimate copies, so test the policy on one host before rolling it out.

Pick the workaround that matches the host. A single host with a few containers can use the stop-before-copy rule. A fleet with automation behind the copy needs the authorization plugin. A team that copies files into containers every day can switch to delivering inputs before the workload starts. Whichever workaround is chosen, record it, give it an expiry date tied to the patch window, and remove it after the upgrade. A workaround that stays in place after the patch becomes a permanent restriction that nobody remembers the reason for.

The design lesson for platforms that copy files into running containers

The flaw is a Docker bug, and the patch fixes it. The pattern behind it reaches further. Many platforms push files into running containers as part of normal work. CI systems copy build inputs into a running build container. Notebook platforms copy user files into a running notebook container. Agent sandboxes copy task files into a running sandbox container. Each of those copies crosses a trust boundary. The host side trusts the container to hold still while the copy runs. The container side may run code that does not share that trust.

Treat the copy as a privileged operation. That single rule shapes several practical choices. Deliver inputs before the workload starts, through a volume prepared by a trusted process, whenever the workflow allows it. A volume that is prepared before the container starts gives the container nothing to rename during a copy, because no copy happens while the workload runs. Keep the set of containers that receive live copies small, and keep the set of people and systems that can run those copies smaller. Log each copy into a running container with the container name, the source of the archive, and the time. A log entry turns a silent window into a visible event, and a visible event is easier to review after an incident.

The same rule applies to API access. The daemon socket and the archive endpoint are powerful interfaces. Limit them to the hosts and accounts that need them. An authorization plugin can restrict the archive endpoint, as described in the workaround section, and the same plugin can restrict other sensitive endpoints. Network controls can limit which hosts reach the daemon at all. Those controls are general hygiene, and this flaw gives them a concrete reason. A container that runs untrusted code should never sit on the far side of an open copy path from a privileged daemon.

The broader lesson from November applies beyond Docker. The same month brought a widely reported NGINX flaw, covered on this site in the NGINX2Root exploitation report and patch check. That flaw and this one share a shape. A routine operation, serving a request or copying a file, carried a hidden path to a protected resource. The fix in each case was a patch, and the follow-up in each case was a review of the trust boundary around the operation. Patching closes the hole. Reviewing the boundary keeps the next hole from mattering as much.

Method note: how this article was verified

No hands-on test was run for this article. The mechanism, the conditions, and the workarounds come from the published sources, and each claim in the article can be checked against them. The Docker Engine 29 release notes give the version number, the date, and the two CVE identifiers. The AICassindra analysis, published November 27, 2026, gives the step-by-step mechanism, the integration test layout, the fix in moby/moby pull request 54279, and the advisory workarounds. The advisory itself is GHSA-vfmq-r373-x89f for CVE-2026-135124 and GHSA-ffh6-8jcg-cjmw for CVE-2026-135844.

Readers can verify the core claims on their own hosts. The version command in the patch section prints the server version, and the release notes give the fixed version to compare it with. The inspect command prints the mounts of a container, including the read-only flag. The upgrade commands and the daemon restart are standard package operations, and the version check after the restart confirms the new binary is running. Those commands are the verification path for this article. They check the host, not the flaw. The flaw itself is described from the published advisory and the published analysis, and the article adds no claim beyond what those pages state.

Check the version, patch to 29.10.1 or later, and restart the daemon. Until the patch lands, stop copying files into running containers that run untrusted workloads, or stop the container first. The fix is a normal upgrade, and the window it closes is narrow. Narrow windows still deserve a patch, because the host directory behind a read-only mount is protected for a reason.

Report a correction to this article

Article illustration
A dim server room aisle with a single rack glowing amber and a small warning triangle on its display, no logos and no readable text