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-H4MF-4V27-HGGJ

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

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 6, 2026·7 min read·1 visit

Executive Summary (TL;DR)

rclone's WebDAV backend leaked sensitive credentials over cleartext HTTP during same-host HTTPS-to-HTTP redirects due to missing protocol scheme validation in its redirection handlers.

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.

Vulnerability Overview

A high-severity security vulnerability exists within the WebDAV backend of rclone, a popular command-line program used to manage files on cloud storage. The vulnerability allows sensitive credentials, cookies, and authentication headers to be transmitted in cleartext over the network when a target server initiates an HTTPS-to-HTTP protocol downgrade redirect. This exposure presents a substantial threat in environment topologies where network transactions cross untrusted segments or are subjected to local interception.

The attack surface resides within the application's HTTP redirection logic, specifically how the client handles transitions between secure transport layers (HTTPS) and plaintext transport layers (HTTP) on matching hostnames. Because the default behavior of Go's net/http package preserves authentication headers during same-host redirection, rclone failed to verify whether the target protocol scheme had been downgraded to unencrypted HTTP. Consequently, any credentials associated with the session are replayed over plaintext.

This vulnerability is classified under CWE-319 (Cleartext Transmission of Sensitive Information), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor), and CWE-522 (Insufficiently Protected Credentials). Successful exploitation allows an on-path attacker or a compromised co-located service to intercept cleartext authentication tokens, such as Basic Authentication headers, session cookies, and custom secret keys. Security teams should prioritize patching this vulnerability to mitigate credential exposure risks during automated backup and synchronization routines.

Root Cause Analysis

To understand the root cause of this vulnerability, one must analyze the inner workings of Go's net/http client redirection handling. When an HTTP client processes a redirection status code (e.g., 301, 302, 307, 308), the default behavior of http.Client is to evaluate whether the target URL belongs to the same domain as the original request. If the host matches, the client preserves the original session headers, including highly sensitive fields like Authorization and Cookie, to maintain a seamless session.

However, Go's default implementation fails to validate transport scheme transitions during this host check. If an initial secure request is made to https://example.com/data and the server redirects the client to http://example.com/data, the standard library considers this the "same host." It does not prevent the transmission of credentials over the newly established unencrypted channel. The client continues the session, replaying the Authorization headers over plain text, which can be observed by any eavesdropper.

In rclone's WebDAV backend, this standard library behavior was exacerbated by custom redirect handlers defined in lib/rest/rest.go. The helper function PreserveMethodRedirectFn was designed to preserve the HTTP request verb (such as maintaining a PROPFIND request across temporary redirects instead of changing to a GET as the standard Go client does). Prior to the patch, neither the WebDAV client instantiation nor the custom redirection handlers verified if the target scheme transitioned from https to http. This left the backend exposed to protocol downgrade manipulations.

Code Analysis and Patch Verification

The vulnerability was remediated by introducing strict transport protocol validation within the custom redirection handlers located in lib/rest/rest.go and explicitly applying these handlers to the WebDAV backend client configuration.

In the patch, a new helper function isHTTPSDowngrade was introduced to examine the protocol scheme transition. It checks the history of the HTTP request execution path by analyzing the via slice, which holds previous requests in the redirection chain:

// isHTTPSDowngrade reports whether following the redirect to req would
// move from an https:// URL to a plaintext http:// URL.
func isHTTPSDowngrade(req *http.Request, via []*http.Request) bool {
	if len(via) == 0 {
		return false
	}
	prev := via[len(via)-1]
	return prev.URL.Scheme == "https" && req.URL.Scheme == "http"
}

The custom redirection handlers were updated to invoke this helper function and immediately abort the redirection process by returning a new error type, ErrHTTPSDowngrade, if a downgrade is detected. This prevents the request from being constructed and transmitted over cleartext:

// ErrHTTPSDowngrade is returned by the redirect handlers when a server tries to
// redirect an HTTPS request to a plaintext HTTP URL. Following such a redirect
// would replay any credentials over the network in cleartext, so rclone refuses.
var ErrHTTPSDowngrade = errors.New("refusing to follow HTTPS to HTTP redirect: would send credentials in cleartext")
 
func PreserveMethodRedirectFn(req *http.Request, via []*http.Request) error {
	if len(via) >= 10 {
		return errors.New("stopped after 10 redirects")
	}
	if isHTTPSDowngrade(req, via) {
		return ErrHTTPSDowngrade
	}
	if len(via) > 0 {
		req.Method = via[0].Method
	}
	return nil
}

To ensure all standard requests outside of method preservation routines are also protected, the patch introduced RefuseHTTPSDowngradeRedirectFn and assigned it to the standard WebDAV HTTP client's CheckRedirect property within backend/webdav/webdav.go:

	// Refuse redirects that downgrade HTTPS to plaintext HTTP.
	client.CheckRedirect = rest.RefuseHTTPSDowngradeRedirectFn
	f.srv = rest.NewClient(client).SetRoot(u.String())

This defensive engineering approach ensures that the application will throw a hard error and fail-closed rather than allowing the Go runtime to transmit credentials insecurely.

Exploitation & Threat Modeling

Exploitation of this vulnerability requires an Adversary-in-the-Middle (MitM) position, a compromised routing path, or control over DNS resolution for the target server's domain. In a real-world scenario, an attacker can exploit this behavior to harvest WebDAV credentials during automated cloud sync tasks.

An attacker begins by positioning themselves along the network path between the client running rclone and the WebDAV storage gateway. Alternatively, if the target network utilizes insecure DNS configurations, the attacker can execute a DNS hijacking attack to point the initial request to an attacker-controlled gateway. When the rclone client initiates its connection to https://webdav.internal.corp/, the attacker-controlled gateway intercepts the traffic.

While the attacker cannot easily forge a valid SSL/TLS certificate to decrypt the active HTTPS session, they can leverage co-located unsecured services or issue a direct redirection response. By sending a 302 Found response with a Location: http://webdav.internal.corp/ header, they instruct the client to follow the redirect on the same host but over plaintext HTTP.

Because the host name matches, the vulnerable version of rclone automatically packages the Authorization: Basic header into the new plaintext request. The client transmits this request to the unencrypted port, allowing the attacker to capture the unencrypted packets via standard packet-sniffing techniques and extract the base64-encoded credentials. This process requires zero interaction from the system administrator.

Impact Assessment

The security impact of credential exposure in rclone's WebDAV backend is high. Because WebDAV interfaces are frequently used for automated backups, system synchronization, and corporate shared drives, the credentials transmitted often possess read and write access to highly sensitive directories.

If an attacker successfully retrieves these credentials, they gain unauthorized access to the WebDAV server with the same permissions as the compromised client. This can result in unauthorized data exfiltration, deletion, or modification of critical backups. In enterprise settings, these credentials might also be linked to active directory accounts or single sign-on systems, allowing the attacker to move laterally across internal networks.

The CVSS v3.1 score is evaluated at 7.4 (High), with the vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N. The complexity is high because the attacker must achieve an on-path position or control routing to intercept the downgrade path. However, because no authentication or user interaction is required to trigger the redirect response, the attack is highly reliable once the network position is established.

Remediation and Defensive Guidance

To fully remediate this vulnerability, security administrators must upgrade all installations of rclone to version v1.75.0 or higher. The upgraded versions contain the mandatory scheme checks that prevent the transmission of credentials during protocol downgrades.

If immediate software upgrades are not possible, administrators should review their WebDAV configurations. The auth_redirect advanced flag must be set to false. When auth_redirect is enabled, it acts as an explicit override that allows rclone to follow redirects that would otherwise be blocked. Ensuring this flag remains disabled is critical for maintaining transport layer security.

From a defensive development perspective, this vulnerability highlights the importance of implementing custom redirection verification rules in Go applications that handle sensitive authorization data. Developers should never rely solely on standard library hostname matching for authentication persistence without explicitly verifying that the transport protocol security has not been degraded.

Official Patches

rcloneFix patch commit for WebDAV credential leak on HTTPS-to-HTTP redirects.

Fix Analysis (1)

Technical Appendix

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

Affected Systems

rclone WebDAV Backend

Affected Versions Detail

Product
Affected Versions
Fixed Version
rclone
rclone
< 1.75.01.75.0
AttributeDetail
CWE IDCWE-319 / CWE-200
Attack VectorNetwork (Adversary-in-the-Middle)
CVSS v3.17.4 (High)
Exploit StatusProof of Concept (PoC) in regression tests
KEV StatusNot Listed
RemediationUpgrade to v1.75.0 or disable auth_redirect

MITRE ATT&CK Mapping

T1557Adversary-in-the-Middle
Credential Access
T1040Network Sniffing
Credential Access
CWE-319
Cleartext Transmission of Sensitive Information

The application transmits sensitive credential headers over unencrypted channels (plaintext HTTP) upon protocol downgrade.

Known Exploits & Detection

GitHub (Integration Tests)The official test suite includes a functional end-to-end regression proof-of-concept showing how standard Go HTTP configurations leak credentials during redirects in rest_test.go.

Vulnerability Timeline

Security patch committed to the official rclone repository.
2026-07-15
rclone version v1.75.0 released with the transport downgrade protection patch.
2026-07-15
GitHub Advisory Database publishes GHSA-H4MF-4V27-HGGJ.
2026-07-15

References & Sources

  • [1]GHSA-H4MF-4V27-HGGJ: rclone WebDAV Credentials Survive a Same-Host HTTPS-to-HTTP Redirect
  • [2]Fix Patch Commit
  • [3]rclone v1.75.0 Release Details

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

•about 2 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
2 views•9 min read
•about 3 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
2 views•5 min read
•about 4 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
3 views•6 min read
•about 5 hours ago•CVE-2025-15366
5.9

CVE-2025-15366: Protocol Command Injection in Python CPython imaplib Standard Library

CVE-2025-15366 is a command injection vulnerability in Python's standard imaplib module, occurring due to the improper neutralization of carriage returns (\r), line feeds (\n), and null bytes (\x00). When an application passes user-controlled input into standard IMAP library calls, an attacker can break out of the line-oriented protocol context and execute arbitrary IMAP directives with the privileges of the authenticated session.

Amit Schendel
Amit Schendel
9 views•7 min read
•about 5 hours ago•CVE-2026-59732
5.0

CVE-2026-59732: Path Traversal (Zip Slip) Vulnerability in rclone archive extract

A path traversal vulnerability (Zip Slip variant) exists in rclone's archive extract functionality before version 1.74.4. The command fails to sanitize relative directory components in archive headers, allowing files to be written outside the target directory or cloud prefix. This issue can result in arbitrary file writes or cloud object overwrites depending on the permissions of the credentials used. Nick Craig-Wood authored the patch on June 29, 2026, which was released in version 1.74.4 on July 14, 2026. This vulnerability is assigned CVE-2026-59732 and is cataloged as GHSA-4vr5-p2gc-h23p. This report provides a detailed root cause analysis, code-level diff, and remediation steps.

Amit Schendel
Amit Schendel
3 views•8 min read
•about 6 hours ago•CVE-2026-71313
6.9

CVE-2026-71313: Local Directory Traversal in rclone via Unsafe Encoding Configurations

A local encoding path traversal vulnerability exists in rclone versions from v1.51.0 up to v1.75.0. When non-default local encoding parameters (such as Slash, None, or Raw) are specified, rclone's standard decoder maps safely encoded fullwidth dot-dot characters back into native directory traversal components. Since the local backend historically lacked a post-resolution path containment check, these relative segments resolved outside the designated synchronization root, allowing arbitrary file creation and modification on the host system.

Amit Schendel
Amit Schendel
5 views•7 min read