CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-71311

CVE-2026-71311: FTP Command Injection via Path CRLF Injection in rclone FTP Backend

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 6, 2026·6 min read·4 visits

Executive Summary (TL;DR)

Insecure filename encoding in rclone's FTP backend combined with lack of validation in the underlying FTP library allows attackers to inject arbitrary FTP commands via crafted filenames.

A protocol-level CRLF injection vulnerability exists in rclone's FTP backend before version 1.75.0. When configured with a non-default filename encoding, rclone allows carriage return and line feed characters to pass directly into the underlying FTP client library. Because the library constructs line-oriented control commands without input validation, an attacker-controlled filename can inject arbitrary FTP commands into the session, allowing unauthorized file deletion and modification on the target server.

Vulnerability Overview

rclone is a command-line utility used to sync, copy, and manage files across various cloud and protocol backends, including File Transfer Protocol (FTP) servers. To support diverse storage systems, rclone translates local filenames to the target protocol using a configurable encoding framework. This translation mechanism ensures that special characters are mapped to acceptable equivalents on the remote filesystem.

The vulnerability is located within backend/ftp/ftp.go and stems from the interaction with the third-party client dependency github.com/jlaffaye/ftp. When users configure rclone to use permissive encoding masks, the encoding engine allows control characters like Carriage Return (\r) and Line Feed (\n) to remain unescaped. This exposes a direct attack surface on the line-oriented FTP control channel.

An attacker who can write files to a source repository synchronized by a victim can place a maliciously named file in the queue. When rclone processes the file path, the raw CRLF sequences are evaluated by the FTP protocol interpreter. This leads to the execution of arbitrary, independent FTP commands within the context of the authenticated session.

Root Cause Analysis

The root cause of CVE-2026-71311 lies in a failure to enforce input validation on protocol control boundaries across two separate software layers: rclone's encoding configurations and the input validation limits of the github.com/jlaffaye/ftp library.

FTP commands are transmitted over a line-oriented TCP control channel where commands are terminated by a standard CRLF sequence. The underlying library utilizes Go's standard library textproto.Conn.Cmd method to format and transmit FTP commands such as STOR or DELE. This method writes strings directly to the socket without verifying if the arguments themselves contain embedded carriage returns or line feeds.

Under rclone's default configuration, filenames are passed through an encoder that maps control characters using the Ctl and CrLf masks. However, if a user explicitly overrides this with less restrictive rules such as encoding = Slash or encoding = None, rclone bypasses these security filters. The raw CRLF sequences are preserved within the path variable and sent down to the FTP client library, splitting the single command into multiple protocol instructions.

Code Analysis and Patch Walkthrough

In vulnerable versions, the initialization function NewFs in backend/ftp/ftp.go instantiated the filesystem configuration without checking if the resolved encoding scheme protected against control character injection. Users could supply configuration structures that omitted critical safety masks.

The remediation patch introduced a dedicated helper function, commandEncoding, which is designed to programmatically enforce CRLF encoding regardless of the user's explicit profile configuration. This is achieved by performing a bitwise OR operation with the encoder.EncodeCrLf mask.

// backend/ftp/ftp.go
 
// commandEncoding hardens the user-configured filename encoding so that it
// can never restore a raw CR or LF.
//
// The FTP control channel is line oriented and the ftp library writes command
// arguments (paths) straight onto it without escaping, so a filename
// containing CR/LF would otherwise be able to inject an independent FTP
// command. CR/LF are therefore always encoded to safe symbols regardless of
// the configured encoding, which is what the default encoding already does.
func commandEncoding(enc encoder.MultiEncoder) encoder.MultiEncoder {
	return enc | encoder.EncodeCrLf
}

In the NewFs constructor, rclone now passes the configured encoding structure through this helper before setting up the operational structures. This ensures that any input path undergoes sanitization, rendering CRLF injection impossible even if the client configuration specifies an encoding of None:

// backend/ftp/ftp.go in NewFs()
 
	opt.Enc = commandEncoding(opt.Enc)

The test suite was also updated to verify that raw carriage returns and line feeds do not persist in paths when using permissive configurations such as encoder.EncodeSlash or encoder.EncodeZero.

Attack Path and Exploitation Mechanism

Exploitation requires an attacker to have write permissions on a storage source that a victim synchronizes to a privileged FTP destination. The attacker must also target an installation where rclone is configured to use a permissive custom encoding.

The attacker creates a file named victim\r\nDELE target-file.dat\r\nNOOP in the source directory. During the sync sequence, rclone detects the file and prepares an upload request. It builds an FTP STOR command using the raw unescaped name.

STOR victim\r\nDELE target-file.dat\r\nNOOP\r\n

When the remote FTP server receives this byte stream, the protocol interpreter processes it as three discrete, sequential commands:

  1. STOR victim - Begins a file upload block.
  2. DELE target-file.dat - Deletes the targeted file on the remote server.
  3. NOOP - Executes a benign no-operation instruction, gracefully terminating the injection sequence without causing connection failures.

Threat and Impact Assessment

The execution of arbitrary FTP commands within an active session allows attackers to perform unauthorized administrative actions. Since the commands are evaluated with the security context of the authenticated rclone user, any resource the victim has access to can be compromised.

The primary impacts are unauthorized file deletion (DELE), directory removal (RMD), and directory creation (MKD). This allows attackers to disrupt backup routines, remove application data, and manipulate directory structures. In environments with highly privileged FTP accounts, attackers could overwrite critical binary files or configuration structures.

Confidentiality impact is generally limited unless the attacker chains this flaw with commands that move or copy data to public directories. The impact rating of 6.4 reflects high integrity and availability risks, combined with the prerequisite of non-default configurations and specific victim interaction.

Detection and Remediation Strategies

Detection can be achieved by auditing active rclone configurations and inspecting system logs. Administrators should inspect rclone.conf files to identify any FTP backend configurations containing encoding = None or encoding = Slash directives.

Network detection involves monitoring FTP control channels (port 21) for anomalous, line-split command transmissions. Normal client behavior will not include administrative command primitives like DELE or RMD embedded within path parameters of transfer requests. System logs that indicate a file transfer command followed immediately by unrelated file actions are high-confidence indicators of exploitation.

# Conceptual Snort / Suricata rule
alert tcp any any -> $FTP_SERVERS 21 (msg:"rclone FTP CRLF Command Injection Attempt"; flow:to_server,established; content:"STOR "; nocase; pcre:"/STOR .*\r\n(DELE|RMD|MKD|RNFR|RNTO) .*\r\n/I"; reference:cve,2026-71311; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation requires upgrading all rclone installations to version 1.75.0 or later. If immediate upgrading is not possible, administrators should remove custom encoding configurations from their FTP profiles, reverting to the default encoding masks that escape control sequences.

Official Patches

rcloneFix commit implementing safe command encoding
rcloneOfficial security advisory and mitigation notes

Fix Analysis (1)

Technical Appendix

CVSS Score
6.4/ 10
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:H

Affected Systems

rclone versions prior to 1.75.0 utilizing the FTP backend with non-default filename encodings

Affected Versions Detail

Product
Affected Versions
Fixed Version
rclone
rclone
< 1.75.01.75.0
AttributeDetail
Vulnerability TypeCWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')
Attack VectorNetwork (AV:N)
Attack ComplexityHigh (AC:H)
Privileges RequiredLow (PR:L)
User InteractionRequired (UI:R)
CVSS v3.1 Score6.4 (Medium)
Exploit StatusProof of Concept / Conceptual
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1565.001Data Manipulation: Stored Data Manipulation
Impact
T1059Command and Scripting Interpreter
Execution
CWE-93
Improper Neutralization of CRLF Sequences ('CRLF Injection')

The product receives input from an upstream source but does not neutralize or incorrectly neutralizes carriage return (CR) and line feed (LF) characters before compiling them into commands.

Vulnerability Timeline

Remediation patch committed to rclone main branch
2026-07-20
GitHub Security Advisory GHSA-8c48-q9wj-3w37 published
2026-08-05
CVE-2026-71311 assigned and published to NVD
2026-08-05

References & Sources

  • [1]GitHub Security Advisory GHSA-8c48-q9wj-3w37
  • [2]Official Patch Commit
  • [3]rclone v1.75.0 Release Notes
  • [4]NVD CVE-2026-71311 Detail Page
  • [5]CVE.org CVE-2026-71311 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•41 minutes ago•GHSA-8V25-V8P6-QF7V
8.6

GHSA-8V25-V8P6-QF7V: Path Traversal in rclone S3 API Gateway Emulation

A path traversal vulnerability exists in the S3 emulation layer of rclone when executing the 'serve s3' subcommand. Because the application maps client-supplied S3 object keys containing relative directory sequences to file paths without proper boundary checks, an attacker can escape the logical containment of a target bucket. This enables unauthorized reading, writing, and deletion of files at the root level of the served storage directory.

Alon Barad
Alon Barad
1 views•5 min read
•about 2 hours ago•GHSA-8MXV-9XHP-86H4
5.3

GHSA-8MXV-9XHP-86H4: Information Disclosure and Credential Leakage during S3 HTTP Redirects in rclone

A critical security flaw was identified in rclone before version 1.75.0, where the custom S3 redirect handler failed to sanitize sensitive authentication headers and encryption keys during cross-host redirects or transport downgrades. This flaw allows attackers on the path or controlling target hosts to intercept sensitive IBM IAM tokens, AWS S3 Express tokens, and customer-provided server-side encryption keys (SSE-C).

Amit Schendel
Amit Schendel
2 views•7 min read
•about 4 hours ago•GHSA-H4MF-4V27-HGGJ
7.4

GHSA-H4MF-4V27-HGGJ: WebDAV Credential Disclosure via Same-Host HTTPS-to-HTTP Redirect in rclone

A protocol downgrade vulnerability in rclone's WebDAV backend allows sensitive credentials, cookies, and authentication headers to be transmitted in cleartext. This occurs when a remote server redirects an HTTPS request to a plaintext HTTP URL on the same host, which the Go HTTP client default behavior permits without checking the protocol transport layer. This report provides a detailed technical analysis of the root cause, exploit mechanics, patch diff, and remediation strategies.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 5 hours ago•CVE-2026-71312
8.0

CVE-2026-71312: OS Command Injection via Unicode Smart Quote Shell Bypass in rclone SFTP Backend

An incomplete sanitization vulnerability exists in rclone's SFTP backend before version 1.75.0 when performing server-side hashing operations on Windows hosts. Due to PowerShell treating Unicode smart quotes as equivalent to ASCII single quotes, malicious file paths can escape command string delimiters and execute arbitrary commands on the remote system.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 6 hours ago•CVE-2026-59733
8.8

CVE-2026-59733: Path Traversal and Authorization Bypass in Rclone serve restic

A critical path traversal and authorization bypass vulnerability exists in the rclone serve restic command when multi-user isolation is enabled using the --private-repos flag. Due to a middleware desynchronization flaw, authenticated users can access, modify, or delete backup repositories belonging to other tenants.

Alon Barad
Alon Barad
3 views•5 min read
•about 7 hours ago•GHSA-GX4C-2HQX-CW2R
3.1

GHSA-gx4c-2hqx-cw2r: Cleartext Transmission of Sensitive AWS STS Tokens in rclone S3 Backend via Scheme Downgrade Redirects

A logic vulnerability in the rclone S3 backend implementation allows an unauthenticated adjacent-network attacker to intercept temporary AWS STS credentials. During HTTP redirection handling, the application fails to verify whether a protocol scheme change occurred (such as transitioning from HTTPS to HTTP). If a secure request is redirected to an unencrypted endpoint on the same host, rclone continues to forward the highly sensitive X-Amz-Security-Token header in cleartext.

Amit Schendel
Amit Schendel
4 views•6 min read