CVE-2026-42306
ADVISORY - githubSummary
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).
GitHub
CVSS SCORE
7.2highChainguard
CGA-cjw6-g67q-rwx9
-
minimos
MINI-3pcf-7pgm-rpxf
-
minimos
MINI-3vwh-vm32-8c38
-
minimos
MINI-4gq5-2chh-wxpr
-
minimos
MINI-5f75-p49h-hfjp
-
minimos
MINI-5gh6-cqjw-j73m
-
minimos
MINI-656c-pjjw-gv2p
-
minimos
MINI-66mf-rmpg-jfhf
-
minimos
MINI-6pmh-8352-5w7r
-
minimos
MINI-6qm9-m8jr-m4mh
-
minimos
MINI-74jw-4v9v-m2gv
-
minimos
MINI-7gp3-qqcx-h7w2
-
minimos
MINI-7rhx-9jg5-4w84
-
minimos
MINI-8666-f4vg-mf3f
-
minimos
MINI-98hg-69r9-hw3f
-
minimos
MINI-9h8h-v3pm-jv27
-
minimos
MINI-9w8v-79rj-2qm5
-
minimos
MINI-c45p-8h9r-q7vf
-
minimos
MINI-cc95-c348-9h7q
-
minimos
MINI-cxhw-hjh4-3mxw
-
minimos
MINI-f776-342p-hvqx
-
minimos
MINI-f89x-9xc4-xcr5
-
minimos
MINI-fc4c-fg5v-xf28
-
minimos
MINI-ff7q-8366-rrpp
-
minimos
MINI-g649-3j56-x22m
-
minimos
MINI-gwv6-q53v-6x86
-
minimos
MINI-h4gx-wx25-493x
-
minimos
MINI-hjxq-7prg-8fjx
-
minimos
MINI-j7j6-hp54-w9x8
-
minimos
MINI-jcxw-5889-c56j
-
minimos
MINI-m2gp-fw32-w9g9
-
minimos
MINI-p49v-x2vw-fxph
-
minimos
MINI-pr3x-g64q-pv7v
-
minimos
MINI-pxf4-w8c4-27cf
-
minimos
MINI-q82h-g6m4-7r85
-
minimos
MINI-qqr8-7983-644h
-
minimos
MINI-qxvf-rprg-mr5c
-
minimos
MINI-r255-4rhw-6qp5
-
minimos
MINI-rmq5-697q-xmc6
-
minimos
MINI-rrxv-3rj4-2786
-
minimos
MINI-rv35-5c5p-34w2
-
minimos
MINI-v638-52v2-599h
-
minimos
MINI-wq3g-55vx-jpxg
-