CVE-2026-135124 in Engine
Summary
by MITRE • 11/25/2026
A race condition during docker cp mount setup in Docker Engine allows a malicious container to leave a read-only bind mount writable while an archive is extracted into the container. When copying files into a container, the daemon bind-mounts the container's volumes into a temporary view and applies the read-only flags afterwards, through a path inside the container's filesystem. A process in the container can change that path in between, so the flags are applied to a different mount and the intended bind mount stays writable for the duration of the copy.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 11/25/2026
The vulnerability described constitutes a race condition within the Docker Engine architecture, specifically affecting the implementation of the docker cp command when interacting with container volumes. This flaw arises from a timing gap in how the daemon manages file system mounts during archive extraction operations. When files are copied into a running container using this mechanism, the Docker daemon initiates a process to bind-mount the target container's volumes into a temporary view layer. The intended security model relies on applying read-only flags to these mounted paths after they have been set up, thereby ensuring that even if an attacker has access to certain directories within the container, they cannot modify critical volume data during sensitive operations like file extraction or deployment.
The technical root cause lies in the sequence of operations performed by the daemon relative to the visibility and mutability of mount points from within the guest operating system. The daemon creates a bind mount at a specific path inside the container's filesystem hierarchy but does not immediately lock this configuration against modifications made by processes running inside that same namespace. Because the read-only flags are applied after the initial setup, there exists a critical window where the underlying file system structure remains mutable. A malicious actor operating within a compromised or untrusted container can exploit this interval to alter the mount path referenced by the daemon before the security constraints are enforced.
By manipulating the filesystem paths during this narrow timeframe, an attacker can redirect the read-only flag application away from the intended volume and onto a different, less critical mount point. Consequently, the original bind mount remains writable for the duration of the copy operation. This effectively bypasses the isolation guarantees provided by Docker's default security settings, allowing processes within the container to write data directly into volumes that were explicitly configured as read-only. Such behavior undermines the integrity controls intended to protect shared storage resources and persistent data from unauthorized modification during administrative tasks.
The operational impact of this vulnerability is significant for environments relying on strict separation between containers and their host-mounted or named volume data. Attackers can potentially corrupt configuration files, inject malicious payloads into application directories, or exfiltrate sensitive information stored in volumes that were presumed to be immutable during specific operations. This capability could facilitate further lateral movement within a containerized environment if the writable state allows for the persistence of backdoors or the modification of entrypoint scripts and system binaries located on those mounts. It also poses risks to data integrity, as critical logs or database files mounted read-only could be altered without detection until after the operation completes.
Mitigation strategies must address both immediate remediation and long-term architectural improvements. The primary defense is to upgrade Docker Engine to a version where this race condition has been patched by enforcing stricter synchronization between mount setup and flag application, ensuring that paths cannot be swapped during critical sections of code execution. Administrators should also review container security policies, employing tools like AppArmor or SELinux to restrict file system modifications at the kernel level rather than relying solely on Docker's internal flags. Additionally, minimizing the privileges granted to containers by running them as non-root users and using read-only root filesystems where possible reduces the attack surface available for such path manipulation exploits.
From a classification perspective, this vulnerability aligns with CWE-362, which describes concurrent execution race conditions that lead to unintended system states. The exploitation technique mirrors aspects of ATT&CK T1074, specifically data staged or collected in local storage before exfiltration, as the attacker leverages temporary writable access to manipulate files within the container environment. Understanding this flaw highlights the importance of atomic operations in security-sensitive file system manipulations and reinforces the need for rigorous testing of privilege escalation vectors in virtualization layers that manage complex mount hierarchies.