lowCVSS 3.1Vulnerability

GHSA-gx4c-2hqx-cw2r

## Vulnerability Details **File**: `backend/s3/s3.go` **Lines**: 1359-1380 (functions `s3CheckRedirect` / `s3RedirectCrossesHost`) ### Root Cause Commit `e7b1eb774` (released in v1.74.3) added a `CheckRedirect` policy for the S3 HTTP client whose purpose is to strip the `X-Amz-Security-Token` header (the AWS STS session token) whenever a redirect chain "crosses a host", so the token isn't forwarded to an unintended origin. `s3RedirectCrossesHost` decides this purely by comparing `url.URL.Host` (hostname[:port]); it never looks at `url.URL.Scheme`. A redirect that keeps the exact same host:port but changes the scheme from `https://` to `http://` therefore compares as "same host" and `X-Amz-Security-Token` is *not* stripped — it is sent again, this time over plaintext HTTP. ```go func s3RedirectCrossesHost(req *http.Request, via []*http.Request) bool { if len(via) == 0 { return false } host := via[0].URL.Host for _, redirect := range via[1:] { if redirect.URL.Host != host { return true } } return host != req.URL.Host } ``` ### Attack Scenario 1. The user configures an `s3` remote (or `--s3-endpoint` pointing at a self-hosted/third-party S3-compatible service) using temporary credentials that include an STS `session_token` (common for assumed-role / CI / Kubernetes IRSA setups). 2. The configured endpoint responds to a request with a 3xx redirect to the *same* host:port but with `http://` instead of `https://` (TLS-front misconfiguration, maintenance redirect, or a malicious/compromised storage provider trying to harvest the token). 3. rclone's S3 HTTP client follows the redirect and re-sends the request, including `X-Amz-Security-Token`, over the now-unencrypted connection to that same host. 4. Any passive observer on that now-plaintext network path can read the STS session token from the request headers. ### Impact Disclosure of the AWS STS session token (`X-Amz-Security-Token`) in cleartext for the remainder of its val

Properties

ghsa_id
GHSA-gx4c-2hqx-cw2r
severity
low
summary
rclone: S3 backend does not strip X-Amz-Security-Token on a same-host HTTPS->HTTP redirect
cvss_score
3.1
cve_id
GHSA-gx4c-2hqx-cw2r
cvss_vector
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
is_ghsa_only
true
ghsa_published
2026-08-05T20:43:11Z
source_url
https://github.com/advisories/GHSA-gx4c-2hqx-cw2r
ghsa_updated
2026-08-05T20:43:12Z

Related Entities (5)

VULNERABLE_TO (1)

[Software]go/github.com/rclone/rclone

AFFECTS (1)

[Software]go/github.com/rclone/rclone

HAS_WEAKNESS (2)

[Weakness]Cleartext Transmission of Sensitive Information
[Weakness]Insufficiently Protected Credentials

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-gx4c-2hqx-cw2r (CVSS 3.1) — Ninja Signal Threat Intelligence | Ninja Signal