Executive brief
Rsync is a widely used utility for synchronizing files between different locations or systems. A security flaw in how the rsync daemon handles files allows a local attacker to trick the system into writing files in unauthorized locations, such as sensitive system directories. This could lead to a full system takeover if the rsync service is running with high privileges and the 'chroot' security feature is disabled.
Technical details
A time-of-check to time-of-use (TOCTOU) race condition exists in the rsync daemon's file handling logic. An attacker with write access to a module path can replace parent directory components with symbolic links during the small window between the daemon's path validation and the actual file operation. This allows the attacker to redirect file writes to arbitrary locations on the filesystem. The vulnerability is exploitable only when the 'chroot' setting is set to false. If the daemon is running with elevated privileges, this can result in arbitrary file creation or modification, leading to privilege escalation. The issue is addressed in version 3.4.3.
Affected products
- RsyncProject rsync < 3.4.3
Timeline
- 2026-05-20: disclosed
- 2026-05-20: patched: Fixed in version 3.4.3
- 2026-05-20: advisory