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·24 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

•8 minutes ago•CVE-2026-126298
7.5

CVE-2026-126298: Quadratic Algorithmic Complexity Denial of Service in NLTK Tree.chomsky_normal_form

CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.

Alon Barad
Alon Barad
0 views•12 min read
•about 1 hour ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
3 views•10 min read
•about 2 hours ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 3 hours ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 4 hours ago•GHSA-GPWC-27CW-RH9R
5.3

CVE-2026-126301: Quadratic CPU Exhaustion in NLTK LegalitySyllableTokenizer

The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 5 hours ago•CVE-2026-126304
8.7

CVE-2026-126304: Symlink Path Traversal in NLTK YCOECorpusReader

CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.

Amit Schendel
Amit Schendel
6 views•9 min read