What is the problem?

A bind mount lets a container use a file or folder from its host computer. You can make it read-only, so the container should not be able to change it:

Examplebash
docker run --mount type=bind,src=/srv/config,dst=/config,readonly example-app

When someone copies files into a running container, Docker sets up its mounts again for a short time. A process in the container may be able to change a path while this happens. Docker can then apply the read-only setting to the wrong place. This leaves the host folder writable during the copy, so files in the copied archive could be written there.

This type of flaw is called a race condition. Docker checks or changes one path, but the path changes before Docker has finished. The flaw is CVE-2026-135124. Docker published its advisory on 24 November 2026 and rated it Moderate, with a CVSS v4 score of 4.1.

Are you at risk?

An attack needs all of these:

  1. Docker Engine is older than 29.10.1.
  2. The container is running and has a read-only bind mount.
  3. A harmful process in the container can change the path to that mount.
  4. Someone uses docker cp or the Docker API to copy files into that container.
Situation At risk?
Copying into a running container with a read-only bind mount Yes, if the other conditions are met
Container has no read-only bind mounts No
Container is stopped No
Copying files out of a container No
Rootless Docker Yes, but only for files its user can access

The attacker cannot start the copy or choose what is in the archive. But any files written to the host remain there after the copy. Pay most attention to CI systems, hosting platforms and tools that automatically copy files into containers with untrusted code.

Check your setup

Check the version of the Docker server. The Docker command on your laptop can be a different version:

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

Then list read-only bind mounts in running containers:

Examplebash
docker ps -q | while read -r id; do
  docker inspect --format '{{$name := .Name}}{{range .Mounts}}{{if and (eq .Type "bind") (not .RW)}}{{println $name .Source "->" .Destination}}{{end}}{{end}}' "$id"
done

A result does not mean that you have been attacked. It shows which containers to check next. Run these commands on every Docker host, including CI runners.

Next, look for tools that copy files into containers. To search your repository:

Examplebash
git grep -nE 'docker (container )?cp|docker compose cp|put_archive|putArchive'

This search cannot find every tool that uses the Docker API. The API request to look for is PUT /containers/{id}/archive. Deployment tools, IDEs and test tools may use it without showing a docker cp command.

Fix it

Update Docker Engine to 29.10.1 or later, and check the server version again. If your Linux distribution provides Docker, check its security notice. It may add the fix to an older version number. Docker Desktop includes its own engine, so check its release notes and the server version.

Updating a container image does not update Docker on the host. A normal Docker Engine update may restart running containers. Read the update steps for your system and plan for this.

Some software uses Docker's code as a Go package, github.com/moby/moby/v2/daemon. When we checked, the GitHub advisory did not list a fixed version of this package. The CVE data says versions before 2.0.0-beta.32 are affected. If you use this package, check the latest advisory before you choose a version.

If you cannot update yet

The Docker advisory suggests three workarounds:

  1. Do not copy files into a running container that contains untrusted code.
  2. Stop the container before you copy files into it:
Examplebash
docker stop example-app
docker cp ./config.json example-app:/tmp/config.json
docker start example-app

This makes the app unavailable for a short time. Check that your system will not start the container again before the copy finishes.

  1. Limit who can use the API request. An authorisation plugin can block PUT /containers/{id}/archive.

For normal deployments, build a new image with the files you need and replace the container. This also gives you a clear record of what changed.

Keep access to the Docker API limited. Access to the standard Docker socket can often give someone control of the host. This update does not change that.

Check for unexpected changes

If your setup met all the conditions, compare the host folders with a trusted copy. Use your logs and file times to look for changes made while files were being copied. File times can be changed, so do not rely on them alone.

If you find an unexpected change, save the evidence and treat the container and host as possibly compromised. Check configuration files, scripts and programs in the affected folder before anyone uses them.

What scanners can and cannot find

Image scanning checks packages inside an image. This flaw is in Docker Engine on the host, so a clean image scan does not show that you are safe. IaC scanning may find broad access to host folders or the Docker socket. It cannot see every copy made by a tool. Use host inventory or a vulnerability scanner for your servers to find old Docker versions.

Check images and Dockerfiles

AquilaX checks container images for known package vulnerabilities and Dockerfiles for risky settings. It does not check the Docker Engine on your server.

See container scanning →