GHSA-2m8m-jhrm-w6j2: rclone: PowerShell Smart-Quote Filename Injection Enables SFTP Server-Side Command Execution
1. Summary
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.
2. Affected Assets & Attack Surface
- Audited commit: a0c09f1381ae93e2a9a33c529d170186c61ad058
- Backend: backend/sftp
- Relevant code:
- backend/sftp/sftp.go:1802-1812 — PowerShell hash commands
- backend/sftp/sftp.go:1663-1699 — Fs.run
- backend/sftp/sftp.go:1988-2067 — Object.Hash
- backend/sftp/sftp.go:2071-2090 — quoteOrEscapeShellPath
- Exposed 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.
3. Technical Root Cause Analysis
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.
4. Proof-of-Concept & Evidence
- Each of the four Unicode smart quotes was passed through the production quoting function and used to terminate the path literal.
- A harmless injected Set-Content statement created a marker file.
- The stronger test invoked the exact production Object.Hash path and MD5 PowerShell command against a fake SSH session backed by local PowerShell.
- A valid prefix file allowed Get-FileHash to complete; the a
Details
Original advisory: https://github.com/advisories/GHSA-2m8m-jhrm-w6j2
Exploitation outlook
EPSS (FIRST.org) estimates each CVE’s probability of exploitation in the next 30 days — here is the CSIRTS.com read on those numbers.
- Low exploitation riskCVE-2026-713120.28% 30-day exploitation probability — currently an unlikely target, but scores change as exploit code circulates. Riskier than 20% of all EPSS-scored CVEs.
Referenced CVEs
| CVE | CSIRTS overview | External |
|---|---|---|
| CVE-2026-71312 | coverage & exploitation status | NVD · CVE.org |
Same CVEs, other sources
How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.
More from GitHub Security Advisories
- mediumGHSA-957r-qf9p-67xw: Craft CMS: Arbitrary file read via SplFileObject in non-sandboxed template contexts2026-08-06
- mediumGHSA-6hr6-w5qg-qmwg: h2: Duplicate Host header could facilitate request smuggling2026-08-06
- mediumGHSA-596p-6jv8-775v: Craft CMS: Authenticated leak of secret environment variables2026-08-06
- mediumGHSA-rvmm-v933-jgxq: Craft CMS: Missing authorization check allows non-admin control panel users access to use…2026-08-06
- lowGHSA-7hxc-f267-h5q7: Craft CMS: Incorrect path validation could potentially lead to path traversal2026-08-06