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

•1 day ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
10 views•10 min read
•2 days ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
14 views•12 min read
•2 days ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read
•2 days ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
13 views•10 min read
•2 days ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
17 views•10 min read
•2 days ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
8 views•9 min read