Docker: Race condition in docker cp allows bind mount redirection to host pathGHSA-rg2x-37c3-w2rh
HIGHGHSA-rg2x-37c3-w2rh is a high-severity (CVSS 7.2) CWE-61 vulnerability in github.com/docker/docker. A fix is available for github.com/docker/docker — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-rg2x-37c3-w2rh.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/docker/docker🐹github.com/moby/moby/v2🐹github.com/moby/mobyReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
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.
Details
When copying files into a container, the daemon sets up a temporary filesystem view by bind-mounting volumes into a private mount namespace. During this setup, the mount destination is created inside the container root and then a bind mount is attached using the container-relative path resolved to an absolute host path.
Between mountpoint creation and the mount() syscall, a process running inside the container can replace the destination (or a parent path component) with a symlink pointing to an arbitrary location on the host. The mount() syscall follows the symlink, causing the volume to be bind-mounted onto an arbitrary host path instead of the intended container path.
Impact
A malicious container can redirect a volume bind mount to an arbitrary host path. The impact depends on the volume content and mount options:
- If the volume is writable, arbitrary host files at the redirected path could be overwritten with the volume's contents.
- If the volume is read-only, the host path is masked by the mount for the duration of the operation, causing denial of service.
- In all cases the mount is temporary (torn down after the
docker cpcompletes), but the effects of any writes persist.
Conditions for exploitation
- A container must have at least one volume mount.
- A process inside the container must be able to rapidly create and swap symlinks at the volume mount destination path.
- An operator must initiate a
docker cpinto that container, or call thePUT /containers/{id}/archiveorHEAD /containers/{id}/archiveAPI endpoints.
Not affected
- Containers that do not have volume mounts are not affected, as the race occurs during volume bind-mount setup.
Workarounds
- Only run containers from trusted images.
- Avoid using
docker cpwith untrusted running containers. - Use authorization plugins to restrict access to the archive API endpoints (
PUT /containers/{id}/archive,HEAD /containers/{id}/archive).
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/docker/docker | all versions | No fix |
| 🐹Go | github.com/moby/moby/v2 | all versions | 2.0.0-beta.14go get github.com/moby/moby/v2@v2.0.0-beta.14 |
| 🐹Go | github.com/moby/moby | all versions | No fix |
Affected Products
enginedockermobymobyprojectmoby\/v2mobyprojectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/docker/docker, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
A fix is available for GHSA-rg2x-37c3-w2rh; check the affected-versions list above or the advisory for the patched release of github.com/docker/docker, then make sure no transitive dependency still pins the vulnerable range.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability is rated as having an Important severity because successful exploitation allows a compromised container with volume mounts to manipulate host filesystem paths, leading to high integrity and availability impact across container boundaries despite the timing constraints of the race condition. Standard…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for GHSA-rg2x-37c3-w2rh (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| RHEM 1.1 for RHEL 10 | flightctl-0:1.1.4-1.el10em | RHSA-2026:68334 |
| Multicluster Global Hub 1.4.9 | multicluster-globalhub/multicluster-globalhub-grafana-rhel9:1786621960 | RHSA-2026:55810 |
| Multicluster Global Hub 1.5.8 | multicluster-globalhub/multicluster-globalhub-grafana-rhel9:1786621682 | RHSA-2026:54577 |
| Multicluster Global Hub 1.6.6 | multicluster-globalhub/multicluster-globalhub-grafana-rhel9:1785863006 | RHSA-2026:54392 |
| Multicluster Global Hub 1.7.4 | multicluster-globalhub/multicluster-globalhub-grafana-rhel9:1785442872 | RHSA-2026:53530 |
| OpenShift API for Data Protection 1.3 | oadp/oadp-mustgather-rhel9:1785177359 | RHSA-2026:51033 |
| OpenShift API for Data Protection 1.4 | oadp/oadp-mustgather-rhel9:1786946294 | RHSA-2026:59467 |
| OpenShift Developer Tools and Services 1.6.4 | source-to-image/source-to-image-rhel8:1784727697 | RHSA-2026:51057 |
Frequently Asked Questions
Is GHSA-rg2x-37c3-w2rh in your dependencies?
Find it across Go, including transitive dependencies.