GO-2026-6182: rclone: PowerShell Smart-Quote Filename Injection Enables SFTP Server-Side Command Execution
rclone is a command-line program to sync files and directories to and from different cloud storage providers. Prior to v1.75.0, rclone interpolates remote SFTP paths into PowerShell hash commands in backend/sftp/sftp.go, and quoteOrEscapeShellPath escapes only ASCII apostrophe even though PowerShell treats U+2018, U+2019, U+201A, and U+201B as single-quote delimiters, allowing an attacker-controlled filename to terminate the intended path literal and append PowerShell statements that execute as the victim SSH account when server-side hashing is invoked. This issue is fixed in v1.75.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rcloneto a version that resolves this vulnerability.Fixed in 1.75.0
Event History
Frequently Asked Questions
Who is exposed to this issue?
Users of rclone versions before 1.75.0 are exposed when using the SFTP backend against a server where an attacker can control a filename and server-side hashing is invoked. The injected PowerShell statements run as the SSH account used by the victim's rclone connection.
What must an attacker do to exploit it?
The attacker needs to provide a filename containing PowerShell smart-quote characters such as U+2018, U+2019, U+201A, or U+201B. When rclone incorporates that remote path into a PowerShell hash command, the character can terminate the intended path literal and append commands.
What should be done to remediate the issue?
Upgrade rclone to version 1.75.0, which fixes the issue. Until upgrading, avoid invoking server-side hashing on SFTP remotes containing attacker-controlled filenames.