{"id":"CVE-2026-71311","aliases":["CVE-2026-71311","GHSA-8c48-q9wj-3w37","BIT-RCLONE-2026-71311","GO-2026-6187"],"related":[],"kind":"vulnerability","state":"published","title":"rclone: FTP Command Arguments Permit CRLF Injection When Custom Encoding Preserves Newlines","summary":"rclone is a command-line program to sync files and directories to and from different cloud storage providers. Prior to 1.75.0, a valid but nondefault FTP filename encoding in backend/ftp/ftp.go can restore raw CR/LF immediately before an attacker-controlled path is interpolated into the line-oriented FTP control channel, and github.com/jlaffaye/ftp formats the argument through textproto.Conn.Cmd without rejecting CR or LF, allowing a filename such as victim CRLF DELE other-secret CRLF NOOP to inject an independent authenticated FTP command when the victim copies or syncs to a more-privileged FTP destination. This issue is fixed in 1.75.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"rclone is a command-line program to sync files and directories to and from different cloud storage providers. Prior to 1.75.0, a valid but nondefault FTP filename encoding in backend/ftp/ftp.go can restore raw CR/LF immediately before an attacker-controlled path is interpolated into the line-oriented FTP control channel, and github.com/jlaffaye/ftp formats the argument through textproto.Conn.Cmd without rejecting CR or LF, allowing a filename such as victim CRLF DELE other-secret CRLF NOOP to inject an independent authenticated FTP command when the victim copies or syncs to a more-privileged FTP destination. This issue is fixed in 1.75.0.","source":"cvelist"},{"lang":"en","text":"## 1. Summary\n\nA valid but nondefault FTP filename encoding can restore raw CR/LF immediately before an attacker-controlled path is interpolated into the line-oriented FTP control channel. The dependency does not reject CR or LF in command arguments, so a filename can inject an independent authenticated command. A real test server observed the injected `DELE` command.\n\nThe default FTP encoding and the configuration-wizard examples include `Ctl` and are not vulnerable to the demonstrated filename. A manual custom encoding that omits `Ctl`/`CrLf` is mandatory and is reflected as High attack complexity. The credible trust boundary is a lower-trust source namespace feeding a more-privileged FTP destination: if the attacker already has equivalent rights on that destination, the report establishes a bug but no privilege gain. Protocol framing must still be enforced at the command sink because a filename-compatibility encoder is not a safe substitute for command-argument validation.\n\n## 2. Affected Assets & Attack Surface\n\n- Verified rclone revision: `a0c09f1381ae93e2a9a33c529d170186c61ad058` (`v1.74.0-240-ga0c09f138`)\n- Current-master check: the relevant paths remained present at commit `961266888fe797390c535386f3b3aa46f4853602` on 2026-07-18\n- rclone FTP encoding: `backend/ftp/ftp.go:232-248`, `768-785`\n- Encoder masks/conversion: `lib/encoder/encoder.go:36-68`, `121-152`, `1144-1165`\n- FTP command sinks: `backend/ftp/ftp.go:1071-1173`, `1309-1428`\n- Dependency: `github.com/jlaffaye/ftp@v0.2.1-0.20251026020404-6602e981a1bb`\n- Dependency command formatting: `ftp.go:604-610`, with path-bearing callers at `ftp.go:893-947`, `1010-1026`, and `1069-1080`\n- Preconditions: an attacker can create a filename in a source namespace, the victim copies/syncs it to an FTP destination with greater authority, and that destination uses a manually configured encoding that leaves CR/LF raw\n- Platform note: Unix and some remote backends can supply newline-bearing names; a local Windows source cannot create the demonstrated filename\n\n## 3. Technical Root Cause Analysis\n\nRclone represents control characters safely in its internal Standard encoding. Immediately before an FTP operation, `FromStandardPath` decodes that representation and applies the configured backend mask. If the mask omits `Ctl`/`CrLf`, raw newlines are restored. The dependency then formats the resulting argument onto a CRLF-delimited control stream through `textproto.Conn.Cmd` without validating it. Reversible filename representation is therefore being used as the only protection for a protocol-command boundary.\n\n## 4. Proof-of-Concept & Evidence\n\nThe source filename was equivalent to:\n\n```text\nvictim\\r\\nDELE other-secret\\r\\nNOOP\n```\n\nWith the default encoding, no raw newline reached the command. With the valid nondefault configuration `encoding = Slash`, `FromStandardPath` restored raw CRLF. During a real FTP path operation, the server parsed `DELE other-secret` as an independent authenticated command. This establishes injection, not merely unsafe serialization. The test did not establish confidentiality impact or operating-system command execution.\n\n## 5. Impact Assessment\n\nInjected commands run with the configured FTP account's permissions. Demonstrated direct impact is deletion of a different path, with corresponding integrity and availability loss inside that account. Other FTP filesystem commands may be reachable, but confidentiality and arbitrary operating-system command execution are not claimed. The privilege-boundary case requires the victim's FTP account to have more authority than the attacker has in the source namespace.\n\n## 6. Remediation Guidance\n\n- Reject CR and LF in every FTP command argument at the lowest command-construction boundary.\n- Apply the check to paths, usernames, passwords, rename arguments, and all other formatted fields.\n- Return an error rather than silently normalizing an unsafe argument.\n- Keep the default encoder protection as defense in depth and reject an FTP encoding configuration that can restore CR/LF.\n- Add end-to-end tests for CR, LF, CRLF, and each path command.","format":"markdown","source":"ghsa"},{"lang":"en","text":"FTP command injection via custom encoding in github.com/rclone/rclone","format":"markdown","source":"go"}],"published":"2026-08-05T20:33:32.558Z","modified":"2026-09-10T03:51:13.369Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:H","score":6.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:H","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:H","score":6.4,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-93"],"affected":[{"ranges":[{"version":"< 1.75.0","status":"affected"}],"vendor":"rclone","product":"rclone","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.75.0"}],"ecosystem":"Go","package":"github.com/rclone/rclone","purl":"pkg:golang/github.com/rclone/rclone","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.75.0"}],"ecosystem":"Go","package":"github.com/rclone/rclone","purl":"pkg:golang/github.com/rclone/rclone","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.75.0"}],"ecosystem":"Bitnami","package":"rclone","purl":"pkg:bitnami/rclone","source":"bitnami"}],"references":[{"url":"https://github.com/rclone/rclone/security/advisories/GHSA-8c48-q9wj-3w37","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/rclone/rclone/commit/1df2b70753286c1dfe8366078cbedfdf7f96472c","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/rclone/rclone/releases/tag/v1.75.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/rclone/rclone","tags":["package"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-71311","tags":["web"],"sources":["bitnami"]}],"credits":["GitHub: cyberlanc3r"],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-06T18:41:49.120Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-71311","url":"https://www.cve.org/CVERecord?id=CVE-2026-71311","licence":"CVE Terms of Use","modified":"2026-08-06T18:44:51.691Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8c48-q9wj-3w37","url":"https://github.com/advisories/GHSA-8c48-q9wj-3w37","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:13.369Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6187","url":"https://pkg.go.dev/vuln/GO-2026-6187","licence":"CC-BY-4.0","modified":"2026-08-18T17:23:53.660Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-71311","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-71311","licence":"Public domain","modified":"2026-09-09T20:50:00.950Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-RCLONE-2026-71311","url":"https://osv.dev/vulnerability/BIT-RCLONE-2026-71311","licence":"Apache-2.0","modified":"2026-08-18T17:23:53.660Z"}],"updatedAt":"2026-11-25T22:59:31.190Z","epss":{"score":0.00237,"percentile":0.15828,"date":"2026-12-01T12:00:22.000Z"}}