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



GHSA-8V25-V8P6-QF7V

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

Alon Barad
Alon Barad
Software Engineer

Aug 6, 2026·5 min read·1 visit

Executive Summary (TL;DR)

The rclone 'serve s3' subcommand suffers from a path traversal vulnerability because it relies on standard Go path joining which normalizes relative sequences (..), allowing clients to access the root directory of the served storage.

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.

Vulnerability Overview

The S3 API gateway emulation layer in rclone, accessible via the rclone serve s3 subcommand, contains a path traversal vulnerability. This component emulates an S3-compatible object storage server on top of rclone's backend storage systems. By exposing this gateway, hosts allow users to interact with files using standard S3 protocol verbs and clients.\n\nThe flaw lies within the translation of S3 object keys to local system or virtual file system (VFS) paths. Under normal operation, each S3 bucket corresponds to a top-level directory within the rclone serve root, while object keys correspond to files nested inside those directories. Users should not be able to traverse outside their allocated bucket directory.\n\nThis vulnerability allows remote attackers with access to the S3 gateway to traverse outside the bucket root directory. By using manipulated object keys, malicious actors can access, overwrite, or delete arbitrary files at the root of the served directory. This violates the multi-tenant isolation assumptions of the S3-compatible interface.

Root Cause Analysis

The core defect exists in how rclone processes S3 object keys to map them to physical paths. In Amazon S3, object keys are flat, opaque strings that can syntactically contain directory separators and relative elements. When processing operations like GetObject, rclone uses Go's standard path.Join function to combine the bucket name and the object key.\n\nThe Go standard library's path.Join function automatically runs path.Clean on the resulting string to normalize it. This behavior resolves relative path segments such as double dots (..) and single dots (.). If an S3 object key contains ../ sequences, path.Join resolves these relative segments against the bucket directory prefix.\n\nFor example, combining a bucket name of bucket and an object key of ../secret.txt produces bucket/../secret.txt. After normalization via path.Clean, this string resolves directly to secret.txt. This resulting path references a file at the root level of the serve directory, completely escaping the bucket directory restriction.

Code Analysis

In the vulnerable implementation, operations in cmd/serve/s3/backend.go directly concatenate path strings using unsafe methods. The functions for object retrieval, metadata querying, file writing, and deletion constructed target paths without validating key structure.\n\nThe vulnerable code pattern is exemplified by the GetObject function:\n\ngo\n// Vulnerable mapping logic\nfp := path.Join(bucketName, objectName)\n\n\nThis direct join allowed relative segments to modify the target directory.\n\nThe patched code introduces a strict validation function canonicalKey and helper function bucketObjectPath. The core modification requires all S3 keys to match their fully cleaned canonical form. If a key contains relative segments, it fails validation and the operation is terminated.\n\ngo\n// Patched validation logic\nfunc canonicalKey(key string) bool {\n return key != "" && "/"+key == path.Clean("/"+key)\n}\n\nfunc bucketObjectPath(bucketName, objectName string) (string, error) {\n if !canonicalKey(objectName) {\n return "", errInvalidObjectName(objectName)\n }\n return path.Join(bucketName, objectName), nil\n}\n\n\nBy anchoring the key with a leading slash during cleaning, the validation ensures that no relative segments can escape the root of the key structure without changing the overall path string, preventing the validation from passing.

Exploitation Methodology

Exploitation of this vulnerability requires network access to the exposed rclone serve s3 endpoint. The attacker does not need special administrative access, only standard permissions to execute S3 API calls on the target bucket. The attack is fully operationalizable using standard S3 client tools or direct HTTP requests.\n\nAn attacker targeting an arbitrary file root-secret.txt at the root of the serve directory would construct an S3 request specifying a valid bucket and a traversed object key. Using the AWS Command Line Interface, the command takes the following form:\n\nbash\naws s3api get-object --endpoint-url http://<rclone-ip>:8080 --bucket targetbucket --key "../root-secret.txt" output.txt\n\n\nThe corresponding HTTP request demonstrates how the raw path is transmitted to the server:\n\nhttp\nGET /targetbucket/../root-secret.txt HTTP/1.1\nHost: <rclone-ip>:8080\nAuthorization: AWS4-HMAC-SHA256 ...\n\n\nUpon receiving this request, rclone parses the object name as ../root-secret.txt. The vulnerable backend normalizes the path to root-secret.txt and returns the file contents to the client, bypassing access boundaries.

Impact Assessment

The impact of this path traversal vulnerability is significant for systems utilizing rclone serve s3 in multi-tenant or untrusted environments. If multiple users are assigned isolated buckets, any user can escape their boundary. This allows unauthorized access to data stored in other buckets or directly at the root.\n\nBeyond arbitrary file retrieval (information disclosure), the vulnerability permits arbitrary file creation and modification. An attacker can write files using PutObject with traversed keys, allowing them to overwrite critical application configurations or upload malicious files to unauthorized directories.\n\nFurthermore, the deleteObject code path is vulnerable. Attackers can delete files at the root level of the server, leading to denial of service or destruction of data. This combination of read, write, and delete capabilities results in complete compromise of the served storage root directory.

Remediation and Mitigation

The primary remediation path is upgrading rclone to version v1.74.4 or later. The patched versions enforce strict canonical path checks on all client-supplied S3 keys. This prevents any non-canonical keys from being processed, causing the server to respond with a 400 Bad Request instead of performing unsafe path normalization.\n\nWhen immediate upgrading is not possible, administrative workarounds can reduce exposure. A reverse proxy or web application firewall (WAF) can be deployed in front of the S3 endpoint. Rules should be configured to inspect and block incoming HTTP requests containing .. or URL-encoded equivalents such as %2e%2e within the request path.\n\nIn addition to input filtering, the rclone process should run with the lowest possible system privileges. Running rclone in a rootless container or a restricted chroot jail limits the file system scope. This sandboxing ensures that even if a path traversal occurs, the process cannot access sensitive host system files outside the designated container environment.

Fix Analysis (2)

Technical Appendix

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

Affected Systems

rclone S3 gateway service (rclone serve s3 subcommand) on all operational environments

Affected Versions Detail

Product
Affected Versions
Fixed Version
rclone
rclone
< v1.74.4v1.74.4
AttributeDetail
CWE IDCWE-22 (Improper Limitation of a Pathname to a Restricted Directory)
Attack VectorNetwork (AV:N)
Required PrivilegesNone (PR:N)
User InteractionNone (UI:N)
CVSS v3.1 Severity Score8.6 (High)
Exploit StatusPoC / Unit-Test verified
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize elements within the pathname that can cause the pathname to resolve to a location outside of the restricted directory.

Known Exploits & Detection

GitHub Security AdvisoryExploit methods via standard S3 client CLI utilities demonstrating boundary escape.

Vulnerability Timeline

Vulnerability identified and core patch committed to rclone master branch.
2026-06-29
GitHub Security Advisory GHSA-8V25-V8P6-QF7V published.
2026-06-29
rclone release v1.74.4 shipped publicly containing the patch.
2026-06-29

References & Sources

  • [1]GitHub Security Advisory GHSA-8V25-V8P6-QF7V
  • [2]rclone Source Code Repository
  • [3]rclone Release v1.74.4

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

•17 minutes ago•GHSA-3X6R-WXXG-53VV
5.3

GHSA-3x6r-wxxg-53vv: Process-Fatal Nil Pointer Dereference in rclone WebDAV TUS Upload Backend

A critical process-fatal NULL pointer dereference vulnerability exists in the WebDAV backend of rclone (when configured with ownCloud Infinite Scale TUS uploads). During transport failures, a nil HTTP response pointer is dereferenced directly without validation, leading to an unhandled Go runtime panic that terminates the entire rclone daemon. This vulnerability was resolved in rclone version 1.75.0.

Amit Schendel
Amit Schendel
0 views•11 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 3 hours ago•CVE-2026-71311
6.4

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

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.

Amit Schendel
Amit Schendel
4 views•6 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