CVE-2026-71312: rclone PowerShell Smart-Quote Filename Injection Enables Vulnerability
HIGHCVE-2026-71312 is a HIGH (CVSS 8.0) powershell smart-quote filename injection enables vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting rclone libraries in the Go ecosystem. The issue involves powershell smart-quote filename injection enables sftp server-side command execution. Remediation is available by upgrading affected packages to version 1.75.0.
CVE-2026-71312 at a Glance
Security Impact
CVSS: 8.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-71312
To remediate this vulnerability, upgrade all affected rclone dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/rclone/rclone to 1.75.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/rclone/rclone
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-71312, inspect your project dependencies for rclone:
inspect dependencies for github.com/rclone/rclone
Analyze the terminal output to locate any version of rclone in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.75.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In rclone, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-71312 Affected rclone Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/rclone/rclone
|
Go |
< 1.75.0
|
1.75.0
|
References
Frequently Asked Questions
What is CVE-2026-71312?
Which rclone versions are affected?
What version fixes CVE-2026-71312?
Is github.com/rclone/rclone affected?
What is the CVSS score of CVE-2026-71312?
What CWE is associated with CVE-2026-71312?
How can I check Go dependencies for CVE-2026-71312?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2m8m-jhrm-w6j2",
"modified" : "2026-08-05T20:37:56Z",
"published" : "2026-08-05T20:37:56Z",
"aliases" : [ "CVE-2026-71312" ],
"summary" : "rclone: PowerShell Smart-Quote Filename Injection Enables SFTP Server-Side Command Execution",
"details" : "## 1. Summary\n\nrclone 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.\n\n## 2. Affected Assets & Attack Surface\n\n- Audited commit: `a0c09f1381ae93e2a9a33c529d170186c61ad058`\n- Backend: `backend/sftp`\n- Relevant code:\n - `backend/sftp/sftp.go:1802-1812` — PowerShell hash commands\n - `backend/sftp/sftp.go:1663-1699` — `Fs.run`\n - `backend/sftp/sftp.go:1988-2067` — `Object.Hash`\n - `backend/sftp/sftp.go:2071-2090` — `quoteOrEscapeShellPath`\n- Exposed input: remote filename controlled by an SFTP collaborator, upstream storage source, or other party able to create or rename files.\n- Required execution context: PowerShell as the SSH command shell, SSH exec enabled, and server-side hashing invoked.\n\n## 3. Technical Root Cause Analysis\n\nFor PowerShell, `quoteOrEscapeShellPath` wraps a path in ASCII apostrophes and doubles only `U+0027`:\n\n```go\nreturn \"'\" + strings.ReplaceAll(shellPath, \"'\", \"''\") + \"'\", nil\n```\n\nWindows 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.\n\nThe security boundary fails because shell syntax is constructed by string concatenation rather than passing data through a non-code channel.\n\n## 4. Proof-of-Concept & Evidence\n\n- Each of the four Unicode smart quotes was passed through the production quoting function and used to terminate the path literal.\n- A harmless injected `Set-Content` statement created a marker file.\n- The stronger test invoked the exact production `Object.Hash` path and MD5 PowerShell command against a fake SSH session backed by local PowerShell.\n- A valid prefix file allowed `Get-FileHash` to complete; the appended statement then executed.\n- The filename used only characters permitted by Windows filesystems and did not depend on slash, colon, pipe, or ASCII apostrophe.\n- The focused test passed normally and under Go's race detector.\n\nReproduction outline:\n\n1. Configure an SFTP remote whose command shell is PowerShell.\n2. Enable or autodetect the PowerShell hash command.\n3. Place a file whose name contains a smart quote followed by a harmless marker-writing statement and PowerShell comment syntax.\n4. Trigger an rclone operation that calculates the remote hash.\n5. Observe the marker created with the SSH account's permissions.\n\n## 5. Impact Assessment\n\nSuccessful 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.\n\nThe 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/rclone/rclone"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.75.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.74.4"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rclone/rclone/security/advisories/GHSA-2m8m-jhrm-w6j2"
}, {
"type" : "WEB",
"url" : "https://github.com/rclone/rclone/commit/e122fba1a57641b63a580aa26c026903a84e2e88"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rclone/rclone"
}, {
"type" : "WEB",
"url" : "https://github.com/rclone/rclone/releases/tag/v1.75.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-05T20:37:56Z",
"nvd_published_at" : null
}
}