Executive brief
Moby is an open-source framework used to build and run containerized applications like Docker. A flaw in how the software handles file transfers allows a malicious container to create empty files or folders anywhere on the host computer's system. This can be used to cause a permanent service outage by blocking system logins or preventing the Docker service itself from restarting.
Technical details
A Time-of-Check Time-of-Use (TOCTOU) race condition exists in the Docker/Moby daemon during the setup of mountpoints for 'docker cp' operations. When copying files into a container, the daemon resolves a path and creates a mountpoint if it doesn't exist; however, a malicious process inside the container can swap a path component with a symlink between these two steps. Because the 'createIfNotExists' function followed symlinks, it would create the file or directory at the symlink's target on the host filesystem with root privileges. This allows for persistent Denial of Service (DoS) by creating files like /etc/nologin or directories where configuration files are expected. The issue is patched in Docker Engine 29.5.1 and Moby 2.0.0-beta.14 by using 'os.Root' to ensure filesystem operations are scoped strictly to the container root.
Affected products
- Docker Docker Engine < 29.5.1
- Docker Docker Daemon <= 28.5.2
- Moby Moby Daemon < 2.0.0-beta.14
Timeline
- 2026-05-18: advisory: GitHub advisory published by Moby maintainers
- 2026-06-12: disclosed: CVE published to NVD