CVE-2026-41568
ADVISORY - githubSummary
Summary
A race condition during docker cp mount setup allows a malicious container to create empty files or directories at arbitrary absolute paths on the host filesystem.
This advisory covers the race during mountpoint creation. The related race during the subsequent mount syscall is tracked in GHSA-rg2x-37c3-w2rh
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 path is first resolved within the container's root filesystem using GetResourcePath, and then used to create the mountpoint (file or directory) if it does not already exist via createIfNotExists.
Between path resolution and mountpoint creation, a process running inside the container can swap a path component for a symlink pointing to an arbitrary location on the host. Because createIfNotExists operates on the already-resolved absolute path using standard os.MkdirAll and os.OpenFile — which follow symlinks in intermediate path components — the symlink is followed and the file or directory is created outside the container root filesystem, as root.
Impact
A malicious container can create empty files or directories at arbitrary absolute paths on the host filesystem, running as root. This enables persistent denial of service — for example:
- Converting
/etc/docker/daemon.jsoninto a directory prevents the daemon from restarting - Creating
/etc/nologinprevents user logins - Overwriting critical system paths with empty files can break host services
The container does not gain read or write access to existing host files — only the ability to create new empty files or directories at chosen paths.
Conditions for exploitation
- A container must be running with a process that can rapidly create and swap symlinks at a 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.
Patches
Mountpoint creation is now scoped to the container root using os.Root (Go 1.24+), which refuses to follow symlinks that escape the opened root directory. All filesystem operations in createIfNotExists (MkdirAll, OpenFile) are performed through the os.Root handle, so even if a symlink swap occurs after path resolution, the creation stays confined to the container root.
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
6.1medium| Package | Type | OS Name | OS Version | Affected Ranges | Fix Versions |
|---|---|---|---|---|---|
| github.com/docker/docker | golang | - | - | <=28.5.2 | Not yet available |
| github.com/moby/moby | golang | - | - | <=28.5.2 | Not yet available |
| github.com/moby/moby/v2 | golang | - | - | <2.0.0-beta.14 | 2.0.0-beta.14 |
| github.com/moby/moby/v2 | golang | - | - | <0.0.0-20260518145843-dd24a3adc1db | 0.0.0-20260518145843-dd24a3adc1db |
CVSS:3 Severity and metrics
The CVSS metrics represent different qualitative aspects of a vulnerability that impact the overall score, as defined by the CVSS Specification.
The vulnerable component is not bound to the network stack and the attacker's path is via read/write/execute capabilities. Either: The attacker exploits the vulnerability by accessing the target system locally (e.g., keyboard, console), or remotely (e.g., SSH); or the attacker relies on User Interaction by another person to perform actions required to exploit the vulnerability (e.g., using social engineering techniques to trick a legitimate user into opening a malicious document).
A successful attack depends on conditions beyond the attacker's control, requiring investing a measurable amount of effort in research, preparation, or execution against the vulnerable component before a successful attack.
The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.
Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited. For example, a successful exploit may only be possible during the installation of an application by a system administrator.
An exploited vulnerability can affect resources beyond the security scope managed by the security authority of the vulnerable component. In this case, the vulnerable component and the impacted component are different and managed by different security authorities.
There is no loss of confidentiality.
Modification of data is possible, but the attacker does not have control over the consequence of a modification, or the amount of modification is limited. The data modification does not have a direct, serious impact on the impacted component.
There is a total loss of availability, resulting in the attacker being able to fully deny access to resources in the impacted component; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the impacted component.
NIST
CVSS SCORE
6.1mediumAlpine
-
Debian
-
Ubuntu
-
CVSS SCORE
N/AmediumGoLang
-
Chainguard
CGA-q8m7-827v-qw9g
-
minimos
MINI-237p-mp72-4g9q
-
minimos
MINI-24gq-mv2r-4323
-
minimos
MINI-2753-hrqv-6jpm
-
minimos
MINI-28ww-3wp8-74x6
-
minimos
MINI-2frh-9vxq-x2x6
-
minimos
MINI-2g7m-2gqg-fx56
-
minimos
MINI-2jrp-h7w7-gwpw
-
minimos
MINI-2mmr-49cg-j8pv
-
minimos
MINI-2mw7-54mm-mvrr
-
minimos
MINI-2x33-qjcr-6536
-
minimos
MINI-32rj-8qp4-9h73
-
minimos
MINI-367m-9xf5-r8fj
-
minimos
MINI-37wj-5w6f-8x4f
-
minimos
MINI-3975-vj5g-97fc
-
minimos
MINI-3cvx-988v-gmcq
-
minimos
MINI-3fj4-33q6-3f6r
-
minimos
MINI-3gvx-x577-qpjc
-
minimos
MINI-3gxw-mv66-9498
-
minimos
MINI-432j-h5c7-gqcx
-
minimos
MINI-43x4-vp3r-jhfv
-
minimos
MINI-46px-m9wh-9jqc
-
minimos
MINI-4739-c777-r3j6
-
minimos
MINI-4f3g-jvw9-9w4h
-
minimos
MINI-4h84-mrfm-93mw
-
minimos
MINI-4j32-ph2r-h79q
-
minimos
MINI-4jq7-g964-rv62
-
minimos
MINI-4p7m-x76q-2h32
-
minimos
MINI-4w44-jpmw-fwph
-
minimos
MINI-53fg-2p7j-7c4j
-
minimos
MINI-5539-924f-39cj
-
minimos
MINI-553r-9fq4-p2w7
-
minimos
MINI-5jv3-8jvv-hj3p
-
minimos
MINI-5p2c-656h-g6wj
-
minimos
MINI-6969-35r9-rvh3
-
minimos
MINI-6m2p-xjv3-q3rq
-
minimos
MINI-6x2r-h93g-3h7c
-
minimos
MINI-6xvf-7332-f5xp
-
minimos
MINI-7395-ffqc-mxpx
-
minimos
MINI-7866-4r24-f4x5
-
minimos
MINI-78wf-p24q-mwgg
-
minimos
MINI-7rh7-8jqh-g5x6
-
minimos
MINI-7vrv-qhvh-v9jf
-
minimos
MINI-7whr-qhr3-4wmx
-
minimos
MINI-836p-72cq-c8g3
-
minimos
MINI-83rc-pgq5-pw5q
-
minimos
MINI-868j-hxgv-m552
-
minimos
MINI-8732-76gv-952x
-
minimos
MINI-882h-7p9q-xj22
-
minimos
MINI-8cq5-wcvw-jqxp
-
minimos
MINI-8crj-rh7x-5278
-
minimos
MINI-8g2x-p77q-phx2
-
minimos
MINI-8h8c-mgpg-fjqj
-
minimos
MINI-8mh5-5cm3-374g
-
minimos
MINI-8qrr-hxx2-j4qq
-
minimos
MINI-8x23-2985-58rh
-
minimos
MINI-92p8-h6v3-ggj7
-
minimos
MINI-9686-33pj-mqjp
-
minimos
MINI-96jm-2f9m-43v2
-
minimos
MINI-9j36-h29f-cvf9
-
minimos
MINI-9jr3-48rm-rfwv
-
minimos
MINI-9v22-hm57-9w6m
-
minimos
MINI-c56v-mw74-84x2
-
minimos
MINI-c7m6-fq8w-r272
-
minimos
MINI-c879-xx22-7pph
-
minimos
MINI-ccx3-27jm-7qrm
-
minimos
MINI-cgc7-v3w8-jwr4
-
minimos
MINI-chrx-4492-f76q
-
minimos
MINI-cq52-vfc7-8wm4
-
minimos
MINI-cr65-5q2r-f7r9
-
minimos
MINI-crpp-8hmf-j2px
-
minimos
MINI-cvqq-6qmp-5p73
-
minimos
MINI-f2wp-8w2f-pf3w
-
minimos
MINI-f3q5-7xgg-g49m
-
minimos
MINI-f4cf-xjj8-7x4j
-
minimos
MINI-f58x-wp78-wfc2
-
minimos
MINI-f5g5-4373-cg9j
-
minimos
MINI-f653-qr7f-8p6x
-
minimos
MINI-f96c-q7mh-v6p9
-
minimos
MINI-fccq-mm4p-fmrj
-
minimos
MINI-fjhp-c5rm-526h
-
minimos
MINI-fp2g-pj32-2wf3
-
minimos
MINI-fpcj-ww8w-8x82
-
minimos
MINI-fpcw-fp24-283f
-
minimos
MINI-fphx-68qw-9qfm
-
minimos
MINI-fpqc-3v6q-7wqr
-
minimos
MINI-fq5q-gjpc-fc3g
-
minimos
MINI-fqfv-cmxw-99h2
-
minimos
MINI-fwmf-mv9m-8hp4
-
minimos
MINI-g49g-3pj5-3982
-
minimos
MINI-g83q-9745-x7mf
-
minimos
MINI-g8v4-wp8c-mv9f
-
minimos
MINI-g999-7897-5jrh
-
minimos
MINI-gf2p-394f-65c6
-
minimos
MINI-gqq3-5785-chcr
-
minimos
MINI-h6pq-hfvj-h96q
-
minimos
MINI-h72c-2gpg-4mmw
-
minimos
MINI-hccx-mc7w-w82w
-
minimos
MINI-hcxv-98vj-9hx9
-
minimos
MINI-hr8f-2mv7-5v46
-
minimos
MINI-j644-8mv5-hxwx
-
minimos
MINI-jc2r-p3vr-877w
-
minimos
MINI-jqfp-vp8r-fc8f
-
minimos
MINI-jrpw-28qf-23q7
-
minimos
MINI-jv95-62xc-7mgx
-
minimos
MINI-jvfq-2742-jpjc
-
minimos
MINI-jwm5-mm5f-hr7f
-
minimos
MINI-m44c-jhvh-xh44
-
minimos
MINI-mcwc-mqgx-rfjh
-
minimos
MINI-mjrv-hchp-2677
-
minimos
MINI-mw87-x8qf-c6pf
-
minimos
MINI-p5mx-ghcr-pv3g
-
minimos
MINI-p6h7-hpvq-vp53
-
minimos
MINI-p6xv-g5m6-j72q
-
minimos
MINI-p92j-p2w2-hv4w
-
minimos
MINI-p9cc-fj8m-qx59
-
minimos
MINI-pcqg-qw2w-rxc6
-
minimos
MINI-pghf-2m5f-2fhf
-
minimos
MINI-pp22-rrmg-rm5h
-
minimos
MINI-ppjg-62gc-6pmf
-
minimos
MINI-q487-9744-c5rm
-
minimos
MINI-q72g-9q2m-mmw2
-
minimos
MINI-q73x-8j6m-cvgw
-
minimos
MINI-qcf3-84vr-9559
-
minimos
MINI-qjhr-mhmg-ghgw
-
minimos
MINI-qp44-v2vp-q7vf
-
minimos
MINI-qqqg-m88w-q8hj
-
minimos
MINI-qv65-qr5j-8jcw
-
minimos
MINI-qvjw-fh2g-m25x
-
minimos
MINI-qxgw-cvf6-jfmr
-
minimos
MINI-r48j-m88j-4vg6
-
minimos
MINI-r4rh-pp8m-vhmm
-
minimos
MINI-r574-v89g-98mc
-
minimos
MINI-r638-82h3-7cvc
-
minimos
MINI-r663-hq35-3hr7
-
minimos
MINI-r6c4-rp93-j2g7
-
minimos
MINI-r6w8-363j-fh7x
-
minimos
MINI-r8jf-wrv5-97q9
-
minimos
MINI-rg27-hf7r-j273
-
minimos
MINI-rphp-p58r-qrq5
-
minimos
MINI-rpjc-fwv2-5wpf
-
minimos
MINI-rq7x-w3r7-4vxm
-
minimos
MINI-rrgh-8jx7-7mr4
-
minimos
MINI-rwfw-hv9w-v6m4
-
minimos
MINI-rwmh-f8hv-vpjf
-
minimos
MINI-v6w8-wq5p-j425
-
minimos
MINI-v8xv-xw72-6g73
-
minimos
MINI-v9qm-cqmv-r9xr
-
minimos
MINI-vh5j-vmrc-qvrv
-
minimos
MINI-vjr2-2fm7-788w
-
minimos
MINI-vqj3-8vrm-8hj5
-
minimos
MINI-vvrv-xr7j-4fhh
-
minimos
MINI-w5hm-hgf2-3g65
-
minimos
MINI-w72r-65mw-6x94
-
minimos
MINI-w75j-f4fx-99c6
-
minimos
MINI-w97c-36qv-w7xf
-
minimos
MINI-wh96-cr26-9qjq
-
minimos
MINI-wmc8-2xm6-f4qp
-
minimos
MINI-wmgw-x5hw-fhjm
-
minimos
MINI-wrvr-vffm-3vxf
-
minimos
MINI-x293-6mv3-wffm
-
minimos
MINI-x2cg-6wgq-89gj
-
minimos
MINI-x2qr-64x8-3mr5
-
minimos
MINI-x55m-wr4h-g83h
-
minimos
MINI-x87p-4q5m-v9pp
-
minimos
MINI-xfwp-8vrx-hxmj
-
minimos
MINI-xh3g-m6x6-c6cq
-
minimos
MINI-xh65-p9rf-3vjq
-
minimos
MINI-xhqp-fjxg-87cw
-
minimos
MINI-xwf6-q668-j772
-