Executive brief
rclone is a command-line program used to manage files on cloud storage. A vulnerability in its 'serve restic' command allows unauthorized users to access, modify, or delete files outside of the specific folder intended to be shared. This could lead to the exposure of sensitive data or the unauthorized modification of system files if the storage backend is misconfigured.
Technical details
A path traversal vulnerability exists in the 'serve restic' command of rclone due to incomplete validation in the WithRemote middleware. The middleware uses path.Clean to validate incoming URL paths; however, path.Clean preserves leading '../' elements in relative paths, allowing them to bypass the check. When these paths are subsequently joined with the backend root using path.Join, the leading traversal elements can cause the resulting path to resolve outside the intended directory. Affected backends include WebDAV, FTP, HTTP, Memory, and SFTP. Attackers can exploit this to perform unauthorized file operations (GET, POST, DELETE) on the underlying storage. The issue is fixed in version 1.75.0.
Affected products
- rclone rclone >= 1.40.0, < 1.75.0
Timeline
- 2026-08-05: advisory: GitHub Advisory GHSA-45pq-889g-fcgh published
- 1.75.0: patched