CVE-2026-42306: Docker Race Condition in docker cp Allows Bind Mount Redirection to Host Path

github.com/docker/docker Updated 18 May 2026

Summary

18/05/2026
No i
High
7.2

CVE-2026-42306: Docker: Race condition in docker cp allows bind mount redirection to host path. Affects github.com/docker/docker versions < 28.5.2. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Docker is an open-source platform that automates the deployment of applications inside software containers. It enables developers to package applications with all their dependencies into a standardized unit for software development. The vulnerability in question arises from a race condition during the docker cp operation, which can lead to unauthorized access and potential overwriting of host files.

Vulnerability Detail

A race condition during the setup of docker cp allows a malicious container to redirect a bind mount target to an arbitrary host path. This occurs because, between the creation of the mountpoint and the execution of the mount() syscall, a process inside the container can replace the destination with a symlink pointing to an arbitrary location on the host. Consequently, the mount() syscall follows the symlink, leading to unintended consequences such as overwriting host files or causing denial of service. The vulnerability affects containers with volume mounts and requires rapid symlink manipulation by a process within the container.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

To mitigate the risk, consider the following workarounds:

  • Only run containers from trusted images.
  • Avoid using docker cp with untrusted running containers.
  • Use authorization plugins to restrict access to the archive API endpoints (PUT /containers/{id}/archive, HEAD /containers/{id}/archive).

Conclusion

The CVE-2026-42306 vulnerability in Docker presents a significant risk due to a race condition that allows bind mount redirection to arbitrary host paths. Users are advised to update their packages to the latest versions and implement recommended workarounds to mitigate potential risks.

See every vulnerability recorded for github.com/docker/docker →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.2, indicating a high severity level.

A container must have at least one volume mount, and a process inside the container must be able to rapidly create and swap symlinks at the volume mount destination path.

No, containers that do not have volume mounts are not affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The impacts include the possibility of overwriting arbitrary host files if the volume is writable or causing denial of service if the volume is read-only.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/docker/docker.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback