๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

Docker 29.10.1 CVE-2026-135124 Mitigation and Audit Guide

Docker 29.10.1 CVE-2026-135124 Mitigation and Audit Guide
CVE-2026-135124 allows a process inside a container to temporarily make a read-only bind mount writable during docker cp operations, enabling files copied into the container to modify the host directory. Docker 29.10.1 patches this vulnerability along with CVE-2026-135844, which permits unbounded reads in user and group ID mapping files. If you use read-only bind mounts to protect configuration files, shared data, or secrets from container tampering, an attacker with container access can exploit the timing window when an administrator or automation tool runs docker cp. Production environments that copy logs, configs, or backups in or out of containers face immediate risk. The attack surface includes CI/CD pipelines that inject build artifacts, monitoring systems that extract logs, and any workflow where docker cp touches containers with read-only mounts. Upgrading to Docker 29.10.1 closes the race condition, but you must first audit which containers expose read-only mounts and where docker cp is invoked. This guide walks through identifying vulnerable versions, finding affected containers, and validating the fix.

Understanding CVE-2026-135124: The Read-Only Mount Race

How docker cp interacts with bind mounts

When you run docker cp to copy files into a container, Docker creates a temporary writable layer inside the container's filesystem namespace. For most paths this works transparently, but bind mounts bypass the normal layering. A read-only bind mount (-v /host/path:/container/path:ro) should prevent the container from writing to /host/path, enforced by the mount flag in the kernel's mount namespace.

The vulnerability arises because docker cp temporarily remounts the target directory during the copy operation. Between the remount and the actual file write, a containerized process can race to flip the read-only flag back to writable. If the process wins the race, files copied by docker cp land in a now-writable mount, modifying the host directory. The window is narrow but reproducible under load or with deliberately timed mount syscalls from inside the container. The official GitHub advisory tracks this as GHSA-vfmq-r373-x89f.

Attack scenario and timing window

An attacker with code execution in a container waits for an external trigger: a scheduled backup script running docker cp /tmp/backup.tar container_id:/data/, a CI job copying build artifacts, or an admin manually extracting logs. The container process monitors /proc/self/mounts or uses inotify to detect the remount event. Within milliseconds, it issues mount --bind -o remount,rw /container/path /container/path. If successful before Docker's internal copy completes, the files written by docker cp now modify /host/path on the host filesystem.

This affects any container with read-only bind mounts where docker cp is used. CI/CD pipelines that copy built binaries into containers, log aggregation systems that pull logs out, and manual admin tasks all create opportunities. The attacker does not need CAP_SYS_ADMIN or privileged mode; the race exploits Docker's own remount logic. CVE-2026-135844, patched in the same release, is unrelated: it allows unbounded reads of /etc/subuid and /etc/subgid during user namespace setup, potentially leaking host user mappings.

Identifying Affected Docker Versions

All Docker Engine releases before 29.10.1 are vulnerable. Check your version with docker --version:

$ docker --version
Docker version 29.10.0, build a1b2c3d

For detailed output including API version and commit hash, use docker version:

$ docker version
Client:
 Version:           29.10.0
 API version:       1.48
 Go version:        go1.22.4

Server:
 Engine:
  Version:          29.10.0
  API version:      1.48 (minimum version 1.24)
  Go version:       go1.22.4

If the server version shows 29.10.0 or earlier, you need to upgrade. Docker version numbering follows MAJOR.MINOR.PATCH; the 29.x series started in late 2025. On Debian, Ubuntu, and derivatives, the package is docker-ce from Docker's official repository or docker.io from distro repos. On RHEL, Rocky, and AlmaLinux, it is docker-ce or the older moby-engine. Package versions do not always match upstream releases:

$ dpkg -l docker-ce | grep ^ii
ii  docker-ce  5:29.10.0-1~ubuntu.22.04  amd64  Docker CE

$ rpm -q docker-ce
docker-ce-29.10.0-1.el9.x86_64

The 5: epoch prefix on Debian and the -1.el9 suffix on RHEL are packaging metadata; the upstream version is 29.10.0. Containerd and runc versions are not relevant to CVE-2026-135124; the vulnerability is in Docker Engine's docker cp implementation. For detailed security hardening practices, see Docker Security & Production Hardening.

Auditing Containers for Read-Only Bind Mounts

Finding containers with read-only mounts

List all mounts for a running container with docker inspect:

$ docker inspect --format '{{range .Mounts}}{{.Source}} -> {{.Destination}} (RW={{.RW}}){{println}}{{end}}' my_container
/var/log/app -> /logs (RW=false)
/etc/app/config -> /config (RW=false)
/data -> /data (RW=true)

Filter for read-only mounts only:

$ docker inspect --format '{{range .Mounts}}{{if eq .RW false}}{{.Source}} -> {{.Destination}} (ro){{println}}{{end}}{{end}}' my_container
/var/log/app -> /logs (ro)
/etc/app/config -> /config (ro)

To audit all containers (running and stopped) in one pass:

$ docker ps -aq | xargs -I {} sh -c 'echo "Container: {}"; docker inspect --format "{{range .Mounts}}{{if eq .RW false}}  {{.Source}} -> {{.Destination}}{{println}}{{end}}{{end}}" {}'

This loops through every container ID, prints the ID, then lists read-only mounts. Empty output for a container means no read-only bind mounts. Save the output to compare against your inventory of expected mounts. Any container with read-only mounts is a potential target if docker cp is used against it.

Checking docker cp usage in logs and scripts

Search systemd journal logs for docker cp invocations on the host:

$ journalctl -u docker.service --since "7 days ago" | grep 'docker cp'

This shows recent copy operations. If your logging includes command-line arguments, you will see source and destination paths. Many environments do not log user commands; check /var/log/audit/audit.log if auditd is enabled with execve syscall rules, or process accounting logs. Grep CI/CD scripts, cron jobs, and orchestration configs:

$ grep -r 'docker cp' /etc/cron.d/ /opt/ci/ ~/.jenkins/
$ grep -r 'docker cp' /srv/ansible/ /etc/kubernetes/manifests/

Docker Compose files and systemd service units that call docker cp in ExecStartPost or ExecStopPost are common in backup and log extraction workflows. Check container orchestration platforms: Kubernetes CronJobs that use kubectl cp (which wraps docker cp or containerd equivalents) and Docker Swarm services with custom healthcheck or update scripts. For a broader container security audit, see Docker Container Security Audit with docker inspect and Benchmarks.

Upgrading to Docker 29.10.1

Ubuntu and Debian upgrade procedure

Docker 29.10.1 ships through Docker's official apt repository at download.docker.com. Verify your repository configuration in /etc/apt/sources.list.d/docker.list:

$ cat /etc/apt/sources.list.d/docker.list
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu jammy stable

The repository should point to download.docker.com or the legacy get.docker.com. If you see docker.io from Ubuntu's universe repository, you are on the distro-maintained package which lags upstream releases. Remove it and add Docker's repository following the instructions at Docker's official documentation. Update and install the patched version:

$ sudo apt update
$ sudo apt install docker-ce docker-ce-cli containerd.io
Reading package lists... Done
Building dependency tree... Done
The following packages will be upgraded:
  docker-ce docker-ce-cli
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

For Ubuntu 20.04 and 22.04 LTS, Docker maintains packages in the stable channel. Confirm availability with apt-cache policy docker-ce before upgrading. After installation, verify the version:

$ docker --version
Docker version 29.10.1, build e4f5d6g

RHEL, Rocky, and Alma upgrade procedure

On RHEL 9, Rocky Linux 9, and AlmaLinux 9, Docker is installed from /etc/yum.repos.d/docker-ce.repo. Check the repository file:

$ cat /etc/yum.repos.d/docker-ce.repo
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg

Update Docker Engine with dnf on RHEL 9 derivatives or yum on RHEL 8:

$ sudo dnf update docker-ce docker-ce-cli containerd.io
Last metadata expiration check: 0:12:34 ago on Mon 10 Feb 2026 14:22:15 UTC.
Dependencies resolved.
================================================================================
 Package              Arch       Version              Repository          Size
================================================================================
Upgrading:
 docker-ce            x86_64     3:29.10.1-1.el9      docker-ce-stable    25M
 docker-ce-cli        x86_64     1:29.10.1-1.el9      docker-ce-stable    14M

On systems using the older moby-engine package, replace it with docker-ce: sudo dnf swap moby-engine docker-ce. After upgrade, check the server version with docker info:

$ docker info | grep 'Server Version'
 Server Version: 29.10.1

For production hardening on Rocky Linux with Docker, see Rocky Linux 9 + Docker + Traefik: Self-Hosted Platform.

Docker Desktop and manual binary installs

Docker Desktop users on macOS and Windows receive updates through the built-in updater. Open Docker Desktop, navigate to Settings โ†’ Software Updates, and apply the 29.10.1 release. Alternatively, download the latest .dmg or .exe from docker.com/products/docker-desktop and reinstall over the existing version. Docker Desktop bundles the Engine, CLI, and containerd; the upgrade replaces all components.

For manual binary installations, download static binaries from github.com/moby/moby/releases/tag/v29.10.1. Extract and replace /usr/bin/dockerd and /usr/bin/docker:

$ wget https://download.docker.com/linux/static/stable/x86_64/docker-29.10.1.tgz
$ tar xzf docker-29.10.1.tgz
$ sudo systemctl stop docker
$ sudo cp docker/dockerd /usr/bin/dockerd
$ sudo cp docker/docker /usr/bin/docker
$ sudo systemctl start docker

Verify with docker --version. Upgrading Docker Engine does not restart running containers. Existing containers continue with the old Engine code until they are recreated; the patch applies to new docker cp operations immediately.

Post-Upgrade Validation and Testing

Test that the patch prevents the read-only mount race. Create a container with a read-only bind mount, attempt to copy a file into it, and verify the mount remains read-only inside the container:

$ mkdir /tmp/testro
$ docker run -d --rm --name testro -v /tmp/testro:/data:ro busybox sleep 300
$ echo "test content" > /tmp/testro/file.txt
$ docker cp /tmp/testro/file.txt testro:/data/
$ docker exec testro sh -c 'mount | grep /data'
/dev/sda1 on /data type ext4 (ro,relatime)

The mount should show (ro,relatime) or similar read-only flags. If the vulnerability were present, an attacker could remount it writable during the docker cp operation. On a patched system, the mount remains read-only and any attempt to write from inside the container fails:

$ docker exec testro sh -c 'echo "exploit" > /data/newfile'
sh: can't create /data/newfile: Read-only file system

Check that existing workloads still function. CI pipelines that use docker cp to inject build artifacts, backup scripts that extract logs, and any automation relying on docker cp should complete without errors. Review Docker daemon logs for new issues after the upgrade:

$ journalctl -u docker.service -n 100 --no-pager
Feb 10 15:43:21 host dockerd[1234]: time="2026-02-10T15:43:21Z" level=info msg="API listen on /var/run/docker.sock"

Look for warnings about mount operations or file copy failures. Clean up the test container: docker stop testro. For ongoing container security audits, use the tools and scripts in Docker Container Security Audit with Python.

Hardening Against Future docker cp Exploits

Avoid docker cp in production automation

Minimize docker cp usage in production environments. For injecting configuration files or secrets, prefer volume mounts set at container start time. If you must copy files at runtime, use docker exec with shell redirection:

$ docker exec my_container sh -c 'cat > /app/config.yaml' < /host/config.yaml

This approach streams the file through stdin without Docker's mount manipulation. For extracting logs or backups, mount a shared volume and let the container write directly:

$ docker run -v /var/log/app:/logs my_app

In Kubernetes, use ConfigMaps and Secrets mounted as volumes instead of copying files post-start. CI/CD pipelines should inject artifacts at build time via COPY in the Dockerfile or use init containers to pull dependencies before the main container starts. Replace docker cp in scheduled jobs with bind mounts or network-based file transfer. This eliminates the attack surface entirely.

Using docker exec and nsenter alternatives

If you need low-level file operations from the host, nsenter enters a container's namespaces without Docker's layer abstraction. Find the container's PID and use nsenter to copy files:

$ PID=$(docker inspect --format '{{.State.Pid}}' my_container)
$ sudo nsenter -t $PID -m -u cp /host/source /container/destination

The -m flag enters the mount namespace, -u the UTS namespace. This bypasses Docker entirely, writing directly to the container's filesystem as seen by the containerized process. nsenter requires root or CAP_SYS_ADMIN on the host, so restrict it to trusted operators. For more on namespaces, see the kernel namespaces documentation. In production, prefer declarative configuration management: Ansible, Puppet, or Chef templates that render files into volumes before container start. This avoids runtime file injection and the security risks it introduces. For comprehensive container security strategies, consult Container Security: Docker & Kubernetes Hardening Guide (2026).

Security Audit Checklist for Docker 29.10.1

After upgrading to Docker 29.10.1, run through this checklist to verify the patch is applied and identify any remaining exposure from past usage patterns. Each checkpoint confirms a layer of defense against CVE-2026-135124 and CVE-2026-135844.

Checkpoint Command/Action Expected Result
1. Verify Docker version on all hosts docker --version on each server Version 29.10.1 or later
2. Audit containers for read-only bind mounts docker ps -aq | xargs -I {} sh -c 'echo "{}"; docker inspect --format "{{range .Mounts}}{{if eq .RW false}}{{.Source}} -> {{.Destination}}{{println}}{{end}}{{end}}" {}' List of containers with ro mounts; cross-check against inventory
3. Search for docker cp in CI/CD and scripts grep -r 'docker cp' /etc/cron.d/ /opt/ci/ /srv/ansible/ Identified scripts using docker cp against ro-mounted containers
4. Review Docker daemon logs for mount activity journalctl -u docker.service --since "7 days ago" | grep -E 'mount|cp' No unusual mount errors or warnings in the week before patching
5. Test representative workload with docker cp Run docker cp into a container with ro mount; verify mount stays ro inside docker exec container mount | grep /path shows (ro, flags
6. Document containers requiring docker cp Maintain list in runbook; schedule refactoring to volume mounts Documented exceptions with mitigation timeline
7. Subscribe to Docker security advisories Watch github.com/moby/moby/security/advisories Email or RSS notifications enabled for new CVEs
8. Re-scan container images trivy image my_image:tag or clair-scanner No HIGH or CRITICAL CVEs in base images unrelated to Docker Engine

For checkpoint 4, if you find suspicious mount activity or unexpected docker cp invocations before the patch date, investigate whether those containers were compromised. Check file modification times on the host paths backing read-only mounts: find /host/ro/path -type f -mtime -7 -ls. Files modified during the vulnerability window may indicate exploitation. For deeper security audits, see Container Security Audit Cheat Sheet.

Addressing CVE-2026-135844 in the Same Update

Docker 29.10.1 also patches CVE-2026-135844, which permits unbounded reads when parsing /etc/subuid and /etc/subgid during user namespace setup. This affects rootless Docker installations and configurations using --userns-remap. An attacker with write access to these files on the host could craft entries causing Docker to read arbitrary amounts of data, leading to memory exhaustion or denial of service during container start.

Check if user namespaces are enabled on your Docker daemon:

$ docker info | grep userns
 userns: enabled
$ grep userns /proc/self/uid_map
         0     100000      65536

If userns appears in docker info or you see non-zero mappings in /proc/self/uid_map, your environment uses user namespace remapping. Rootless Docker always uses user namespaces. The fix in 29.10.1 adds bounds checking when reading /etc/subuid and /etc/subgid, preventing the DoS vector. No separate action is required beyond upgrading, but audit those files for unexpected or malformed entries:

$ cat /etc/subuid
dockremap:100000:65536
$ cat /etc/subgid
dockremap:100000:65536

Each line should follow username:start_uid:count format. If you see abnormally large ranges (over 1 million UIDs) or entries for users that should not run containers, investigate. Remove any unauthorized entries and restart the Docker daemon. For rootless Docker security details, see Rootless Docker in 2026: Security Benefits and Production Migration.

Next Steps After Patching Docker 29.10.1

With CVE-2026-135124 and CVE-2026-135844 patched, focus on reducing future attack surface. Start by eliminating docker cp from automation: refactor CI/CD pipelines to use volume mounts or docker exec with stdin redirection. Document every remaining docker cp invocation and schedule it for removal. Review container security policies: enforce read-only root filesystems where possible (--read-only flag), drop unnecessary capabilities with --cap-drop=ALL, and run containers as non-root users (--user). Enable Docker Content Trust (export DOCKER_CONTENT_TRUST=1) to verify image signatures.

Integrate vulnerability scanning into your CI pipeline. Run trivy image or clair-scanner on every build and block deployments with HIGH or CRITICAL CVEs. Subscribe to security mailing lists: the Docker security advisories feed and your Linux distribution's security announce list. Set up automated patching for Docker Engine on non-production hosts; test updates in staging before rolling to production. Maintain an inventory of all containers with read-only mounts and audit it monthly.

For teams managing large Docker fleets, Docker Security & Production Hardening covers defense-in-depth strategies, runtime monitoring with Falco, and incident response playbooks. Keep your audit scripts in version control and re-run them after every Docker upgrade. Document your security posture in a runbook that includes CVE response procedures, escalation paths, and rollback plans. Regular security audits combined with prompt patching keep your container infrastructure resilient against emerging threats.

Frequently Asked Questions

Does CVE-2026-135124 affect rootless Docker installations?

Yes. Rootless Docker uses the same docker cp implementation, and the read-only bind mount race condition exists regardless of whether the daemon runs as root. The attack requires code execution inside the container, which is equally feasible in rootless mode. Upgrade to 29.10.1 for all Docker installations, rootless or root.

Can an attacker exploit this CVE without exec access inside the container?

No. The exploit requires a process running inside the container to monitor mount events and issue remount syscalls during the docker cp timing window. If an attacker cannot execute code in the container (no shell access, no compromised application), they cannot trigger the race condition. The vulnerability is a privilege escalation from container code execution to host filesystem modification.

Do I need to restart running containers after upgrading to Docker 29.10.1?

No. Running containers continue unchanged after a Docker Engine upgrade. The patch applies immediately to new docker cp operations against any container, running or stopped. You do not need to recreate containers unless you want to apply other changes like new base images or runtime flags. The daemon upgrade is sufficient.

How can I detect if this vulnerability was exploited before I patched?

Check file modification times on the host paths backing read-only mounts: find /host/ro/path -type f -mtime -30 for files changed in the last 30 days. Cross-reference those times against docker cp invocations in logs. Review Docker daemon logs for mount errors or warnings. If you find unexpected modifications during the vulnerable period, treat it as a potential breach: rotate secrets, audit container images for backdoors, and check for persistence mechanisms on the host.

Is docker compose affected by CVE-2026-135124?

Docker Compose does not use docker cp in its normal workflow. Compose creates containers, starts them, and manages volumes through the Docker API, but it does not copy files into running containers. If your docker-compose.yml or custom scripts invoke docker cp against containers with read-only bind mounts, those operations are vulnerable. Upgrade Docker Engine to 29.10.1; Compose itself does not need updating for this CVE.

Share this article:
Dorian Thorne
About the Author

Dorian Thorne

Cloud Infrastructure, Cloud Architecture, Infrastructure Automation, Technical Documentation

Dorian Thorne is a cloud infrastructure specialist and technical author focused on the design, deployment, and operation of scalable cloud-based systems.

He has extensive experience working with cloud platforms and modern infrastructure practices, including virtualized environments, cloud networking, identity and acces...

Cloud Computing Cloud Networking Identity and Access Management Infrastructure as Code System Reliability

Stay Updated

Subscribe to our newsletter for the latest tutorials, tips, and exclusive offers.