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).{
"github_reviewed_at": "2026-05-18T17:53:08Z",
"nvd_published_at": null,
"cwe_ids": [
"CWE-367",
"CWE-61"
],
"severity": "HIGH",
"github_reviewed": true
}