Go Vulnerability Database
GO-2026-5668
Race condition in 'docker cp' in github.com/docker/docker allows creation of arbitrary files
Details
A race condition in the Docker daemon allows an attacker to create arbitrary empty files on the host system during a "docker cp" operation by swapping a destination path with a symbolic link.
The affected code is in the daemon package, specifically the openContainerFS and createIfNotExists methods. This is daemon-owned, Linux-specific code and is not intended for external use as a Go library.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Go | github.com/docker/docker | All versions, no fix listed |
| Go | github.com/moby/moby | All versions, no fix listed |
| Go | github.com/moby/moby/v2 | All versions before 2.0.0-beta.14 (fixed in 2.0.0-beta.14) |