| Package | Affected versions | Patched versions |
|---|---|---|
| github.com/docker/docker | ≤ 28.5.2all versions | |
| github.com/moby/moby | ≤ 28.5.2all versions | |
| github.com/moby/moby/v2 | < 2.0.0-beta.14 | 2.0.0-beta.14 |
| engine | < 29.5.1 | 29.5.1 |
| moby | ≤ 28.5.2 | |
| moby/v2 | = 2.0.0 |
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.
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.
A malicious container can redirect a volume bind mount to an arbitrary host path. The impact depends on the volume content and mount options:
docker cp completes), but the effects of any writes persist.docker cp into that container, or call the PUT /containers/{id}/archive or HEAD /containers/{id}/archive API endpoints.docker cp with untrusted running containers.PUT /containers/{id}/archive, HEAD /containers/{id}/archive).Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free