CVE-2026-42306: Docker Engine Race Condition in Bind Mount Setup (CVSS 7.2)
A race condition in Moby and Docker Engine allows a container to intercept and redirect bind mount operations to unintended host filesystem locations. A malicious or compromised container could exploit this timing window during the `docker cp` mount setup phase to write files to arbitrary paths on the host, potentially overwriting critical files or disrupting services. The vulnerability requires local access and user interaction, but poses significant risk in multi-tenant environments where untrusted containers run alongside sensitive workloads.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.2 HIGH · CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:H
- Weaknesses (CWE)
- CWE-367, CWE-61
- Affected products
- 16 configuration(s)
- Published / Modified
- 2026-06-12 / 2026-06-17
NVD description (verbatim)
Moby is an open source container framework. In Docker Engine prior to version 29.5.1, Docker Daemon versions 28.5.2 and prior, and Moby Daemon prior to version 2.0.0-beta.14, a race condition during docker cp mount setup allows a malicious container to redirect a bind mount target to an arbitrary host path, potentially overwriting host files or causing denial of service. This issue has been patched in Docker Engine version 29.5.1 and Moby Daemon version 2.0.0-beta.14.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-42306 is a time-of-check to time-of-use (TOCTOU) race condition in Moby and Docker Engine's bind mount initialization logic. When a container executes `docker cp` operations, the mount target path is resolved and then mounted; an attacker can manipulate filesystem state between these steps to redirect the mount to an arbitrary location. The vulnerability is rooted in CWE-367 (improper synchronization) and CWE-61 (UNIX symbolic link following). Affected versions include Docker Engine prior to 29.5.1, Docker Daemon 28.5.2 and earlier, and Moby Daemon before 2.0.0-beta.14. The race condition's exploitability is moderately high on local systems where the attacker has container runtime privileges and can trigger copy operations with controlled timing.
Business impact
In production container orchestration environments, this vulnerability could enable unauthorized data exfiltration, host filesystem corruption, or denial-of-service attacks. Multi-tenant Kubernetes clusters and shared Docker hosts are at elevated risk if tenant isolation relies on filesystem namespace separation. Compromised container images could leverage this flaw to escape logical boundaries and corrupt shared storage mounts, host configuration files, or logging systems, potentially cascading to affect multiple applications or violating compliance requirements around data integrity and access controls.
Affected systems
Docker Engine versions prior to 29.5.1 are vulnerable. Docker Daemon versions 28.5.2 and earlier are affected. Moby Daemon versions prior to 2.0.0-beta.14 require patching. Organizations using these container runtime versions in production should prioritize inventory and upgrade planning. Note that Moby v2 beta builds are included in the affected vendor product list, indicating ongoing risk in development and early-adoption deployments.
Exploitability
The attack requires local access (AV:L), non-trivial timing manipulation (AC:H), and legitimate container privileges (PR:L), combined with user interaction to trigger a copy operation (UI:R). While not trivial to exploit reliably, the race window is consistent and predictable in containerized workloads. Attackers do not need zero-day tooling; standard container runtime features and shell commands suffice. Impact scope is significant (S:C), affecting host integrity beyond container boundaries. This is not an unauthenticated remote vulnerability, but remains practically exploitable in environments where user or tenant-initiated container operations are routine.
Remediation
Upgrade Docker Engine to version 29.5.1 or later. Update Docker Daemon to a version after 28.5.2. For Moby deployments, upgrade Daemon to 2.0.0-beta.14 or newer. Verify patch application by checking `docker --version` and confirming the build timestamp aligns with vendor advisories. Until patching is complete, apply compensating controls: restrict container privileges using security policies (e.g., Pod Security Standards), disable `docker cp` operations where feasible, and monitor mount activity via audit logs.
Patch guidance
Consult the official Docker and Moby release notes for version-specific upgrade procedures. Docker Engine upgrades typically require daemon restart; plan downtime in non-HA environments or use orchestrator rolling update strategies in Kubernetes. Test patches in non-production clusters first to confirm compatibility with your container images and volume configurations. Verify that mounted filesystems remain accessible post-patch and that application performance is unaffected. For Moby custom builds, backport fixes from the 2.0.0-beta.14 release tag if you are not yet on the official release.
Detection guidance
Monitor audit logs and container runtime logs for unusual bind mount operations, especially rapid sequences of mount/unmount calls or symbolic link creation in mount target directories during `docker cp` execution. Track process-level syscalls (mount, open, symlink) using auditd or eBPF-based tools. Alert on failed mount attempts followed by successful mounts to different paths. In Kubernetes environments, inspect Pod logs and node-level events for mount errors. Forensic investigation should focus on host filesystem timestamps and inode changes in directories that could have been targeted by redirection attacks.
Why prioritize this
This vulnerability merits urgent patching despite moderate CVSS (7.2/HIGH) due to several factors: (1) it affects the container runtime core functionality, enabling host filesystem compromise; (2) it applies to Docker Engine and Moby across multiple versions, with broad deployment footprint; (3) exploitation requires only container-level privileges, not root or network access; (4) once exploited, consequences include persistent host corruption and potential compliance violations; (5) multi-tenant and Kubernetes environments face elevated risk. Organizations should treat this as a Priority 1 patch for production container infrastructure.
Risk score, explained
CVSS 7.2 reflects HIGH severity. The local attack vector (AV:L) and privilege requirement (PR:L) limit blast radius to systems where untrusted code runs in containers. However, high impact on integrity (I:H) and availability (A:H), combined with scope change (S:C) affecting the host, elevates risk. The 'hard' complexity (AC:H) reflects the need to win a race condition, but does not eliminate practical exploitability in containerized environments where `docker cp` is routine. Context matters: in single-tenant or air-gapped Docker deployments, risk is lower; in shared Kubernetes clusters or untrusted container registries, risk is substantially higher than the base CVSS suggests.
Frequently asked questions
Can this vulnerability be exploited without running a container?
No. The attacker must have local container runtime privileges to initiate the race condition. However, any user with permission to run containers (including via Kubernetes pod creation) can attempt exploitation. This excludes pure remote attacks but includes insider threats and compromised container images.
Will this affect my Kubernetes cluster if all nodes run a patched Docker Engine version?
If all nodes run Docker Engine 29.5.1 or later, or patched Moby 2.0.0-beta.14+, the vulnerability is remediated at the runtime level. However, if you have lingering older nodes in a rolling upgrade scenario, those nodes remain vulnerable until updated. Use node affinity rules and cordon strategies to isolate unpatched nodes during upgrade windows.
Is there a workaround if I cannot patch immediately?
Partial mitigations exist: disable or restrict `docker cp` via admission policies or Pod Security Standards, run containers with minimal privileges, and implement filesystem-level monitoring to detect suspicious mount activity. These are temporary measures only; patching is the definitive fix.
Does this affect only Docker Desktop or also server deployments?
Both are affected. Docker Desktop for developers and Docker Engine in production servers running versions prior to 29.5.1 are vulnerable. Moby-based custom runtimes are also in scope. Prioritize server deployments first, but do not neglect developer machines that may be used in development/testing workflows.
This analysis is provided for informational purposes by SEC.co and does not constitute legal or professional security advice. Organizations must verify patch availability, compatibility, and version numbers against official Docker and Moby vendor advisories before applying any updates. Risk assessment should be tailored to your specific environment, threat model, and regulatory obligations. SEC.co makes no warranty regarding the accuracy, completeness, or timeliness of this information. For security incidents or confirmed exploitation, contact Docker [email protected] or refer to your incident response procedures immediately. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-41568MEDIUMDocker & Moby Race Condition in docker cp Mount Setup
- CVE-2025-64390HIGHPlayStation 4 BD-J Sandbox Escape Privilege Escalation (Firmware 13.00-13.02)
- CVE-2026-24065HIGHWaves Central macOS Privilege Escalation Race Condition
- CVE-2026-24067HIGHSlate Digital Connect macOS Privilege Escalation via XPC PID-Based TOCTOU Race Condition
- CVE-2026-25260HIGHQualcomm Firmware Memory Corruption Vulnerability
- CVE-2026-45487HIGHWindows TOCTOU Privilege Escalation in Program Compatibility Assistant
- CVE-2026-46227HIGHLinux SCTP Race Condition Use-After-Free Privilege Escalation
- CVE-2025-43278MEDIUMmacOS Sequoia Symlink Handling Vulnerability – Patch to 15.4