Aug 6, 2026·7 min read·13 visits
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.
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.
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.
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 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.
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.
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.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
rclone rclone | < 1.75.0 | 1.75.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-319 / CWE-200 |
| Attack Vector | Network (Adversary-in-the-Middle) |
| CVSS v3.1 | 7.4 (High) |
| Exploit Status | Proof of Concept (PoC) in regression tests |
| KEV Status | Not Listed |
| Remediation | Upgrade to v1.75.0 or disable auth_redirect |
The application transmits sensitive credential headers over unencrypted channels (plaintext HTTP) upon protocol downgrade.
CVE-2026-61427 is a critical authentication bypass and improper input validation vulnerability within the Model Context Protocol (MCP) HTTP-stream server of PraisonAI. In versions prior to 4.6.78, the server lacks authentication by default and forwards client messages directly to Python tool handlers without input validation. When bound to non-localhost interfaces, this permits unauthenticated remote attackers to perform unauthorized administrative operations and execute tools.
CVE-2026-107387 is a high-impact uncontrolled memory allocation vulnerability in music-metadata, a widely used Node.js metadata parser. The flaw occurs in the APEv2 tag parser, where the library reads an attacker-controlled 32-bit integer indicating the tag size and immediately requests a corresponding heap buffer reservation. Because this allocation occurs before validating if the input stream actually contains those bytes, an attacker can supply a minuscule audio file to trigger large, disproportionate allocations, resulting in heap exhaustion and an uncatchable process-wide Out of Memory (OOM) crash.
An input validation vulnerability exists in music-metadata versions prior to 11.16.0, where parsing a crafted MP4 file containing a sample-description (stsd) box with a zero-value size entry causes a synchronous infinite loop and memory exhaustion, resulting in complete Denial of Service.
A path traversal vulnerability in datamodel-code-generator allows remote attackers to write or overwrite arbitrary files on the local host filesystem via a manipulated Protobuf schema containing malicious weak import paths.
PraisonAI is vulnerable to an arbitrary local file read vulnerability prior to version 4.6.78. The flaw is in the ContextGatherer component, where validation checks are executed only after files are parsed and appended to the context bundle, bypassing security constraints.
An algorithmic complexity vulnerability (CWE-770) in the Excelize library allows remote attackers to cause resource exhaustion (100% CPU usage) via a crafted Microsoft Excel spreadsheet. This occurs because the look-ahead row index parsing in Rows.Columns() fails to enforce upper boundary limits, enabling an out-of-bounds row index to trigger an infinite seek loop inside the Rows iterator.