Skip to content

rclone: WebDAV Credentials Survive a Same-Host HTTPS-to-HTTP Redirect

Moderate severity GitHub Reviewed Published Jul 31, 2026 in rclone/rclone

Package

gomod github.com/rclone/rclone (Go)

Affected versions

<= 1.74.0

Patched versions

1.75.0

Description

1. Summary

WebDAV's default redirect handling can replay Basic authorization and configured Cookie headers over plaintext HTTP after a same-host HTTPS-to-HTTP redirect. This was reproduced through the real backend. Unlike the low-impact STS token in rclone's published S3 redirect advisory, Basic passwords and session cookies are complete reusable credentials, supporting a High rating when they grant normal WebDAV read/write access.

The credible threat requires a legitimate endpoint, gateway, or accelerator to emit an unsafe redirect and an adjacent/on-path actor to observe the plaintext hop. A report should not rely on a malicious original WebDAV endpoint because that endpoint already receives the credentials.

2. Affected Assets & Attack Surface

  • Backend configuration/authentication: backend/webdav/webdav.go:127-139, 170-206, 440-530
  • Shared redirect callback: lib/rest/rest.go:218-231
  • HTTP client: fs/fshttp/http.go:311-329
  • Credentials: Basic passwords, bearer authorization, SharePoint/session cookies, and configured secret headers
  • Confirmed affected version: <= v1.74.0-240

3. Technical Root Cause Analysis

PreserveMethodRedirectFn limits redirect count and restores the original method, but it does not reject a transport downgrade or compare the full origin tuple. The client therefore relies on Go's hostname-oriented sensitive-header forwarding rules. Those rules can preserve Authorization and Cookie on a same-host redirect even when the new scheme is plaintext HTTP.

4. Proof-of-Concept & Evidence

  1. Configure the actual WebDAV backend with Basic credentials and a Cookie.
  2. Have the TLS endpoint return 307 Temporary Redirect to an HTTP listener on the same hostname and a different port.
  3. rclone follows the redirect while preserving the WebDAV method.
  4. The plaintext listener receives both the Basic Authorization value and Cookie.

5. Impact Assessment

An on-path observer can reuse the captured password, bearer token, or session cookie for the account's permitted WebDAV operations. Confidentiality, integrity, and availability impact depend on that account's permissions.

6. Remediation Guidance

  • Reject every HTTPS-to-HTTP redirect before replay.
  • Forward authenticated requests by default only when scheme, hostname, and effective port are unchanged.
  • Strip authorization, cookies, proxy credentials, and configured secret headers on all other redirects.
  • Put necessary provider exceptions behind exact destination allowlists.
  • Cover 301, 302, 303, 307, and 308 in regression tests.

References

@ncw ncw published to rclone/rclone Jul 31, 2026
Published to the GitHub Advisory Database Aug 5, 2026
Reviewed Aug 5, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Adjacent
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

EPSS score

Weaknesses

Cleartext Transmission of Sensitive Information

The product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors. Learn more on MITRE.

Insufficiently Protected Credentials

The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-h4mf-4v27-hggj

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.