rclone interpolates remote SFTP paths into PowerShell hash commands. Its quoting helper escapes only ASCII apostrophe, although PowerShell accepts four Unicode smart quotes as single-quote delimiters. An attacker-controlled filename can therefore terminate the intended path literal and append PowerShell statements executed as the victim's SSH account.
Audited commit: a0c09f1381ae93e2a9a33c529d170186c61ad058
Backend: backend/sftp
Relevant code:
backend/sftp/sftp.go:1802-1812 — PowerShell hash commandsbackend/sftp/sftp.go:1663-1699 — Fs.runbackend/sftp/sftp.go:1988-2067 — Object.Hashbackend/sftp/sftp.go:2071-2090 — quoteOrEscapeShellPathExposed input: remote filename controlled by an SFTP collaborator, upstream storage source, or other party able to create or rename files.
Required execution context: PowerShell as the SSH command shell, SSH exec enabled, and server-side hashing invoked.
For PowerShell, quoteOrEscapeShellPath wraps a path in ASCII apostrophes and doubles only U+0027:
return "'" + strings.ReplaceAll(shellPath, "'", "''") + "'", nil
Windows PowerShell also treats U+2018, U+2019, U+201A, and U+201B as single-quote delimiters. Those characters pass through the rclone encoder and can close the quoted path. The completed string is sent as shell source through an SSH exec request.
The security boundary fails because shell syntax is constructed by string concatenation rather than passing data through a non-code channel.
Set-Content statement created a marker file.Object.Hash path and MD5 PowerShell command against a fake SSH session backed by local PowerShell.Get-FileHash to complete; the appended statement then executed.Reproduction outline:
Successful exploitation provides arbitrary command execution as the victim's SSH account. This can permit file theft, modification, deletion, credential access, persistence, and lateral movement allowed by that account.
The attacker needs filename-control capability but does not need the victim's SSH credentials or an interactive shell. The rclone user's hash operation supplies the execution step.
{
"license": "CC-BY-4.0",
"sources": [
{
"database_specific": {
"status": "Awaiting Analysis"
},
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2026-71312",
"id": "CVE-2026-71312",
"imported": "2026-11-21T05:06:09.729Z",
"modified": "2026-11-03T23:17:53.807Z",
"published": "2026-08-05T21:16:58.867Z",
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-71312"
},
{
"html_url": "https://github.com/advisories/GHSA-2m8m-jhrm-w6j2",
"id": "GHSA-2m8m-jhrm-w6j2",
"imported": "2026-11-21T05:05:45.260Z",
"modified": "2026-08-05T20:38:00Z",
"published": "2026-08-05T20:37:56Z",
"url": "https://api.github.com/advisories/GHSA-2m8m-jhrm-w6j2"
},
{
"affected": {
"rclone:rclone": [
"< 1.75.0"
]
},
"html_url": "https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-53619",
"id": "EUVD-2026-53619",
"imported": "2026-11-21T05:04:16.587Z",
"modified": "2026-11-03T22:13:31Z",
"published": "2026-08-05T20:37:49Z",
"url": "https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2026-53619"
}
]
}