CVE-2026-79782
rclone before 1.74.4 Security Token Disclosure via HTTPS to HTTP Redirect
rclone before 1.74.4 fails to strip the X-Amz-Security-Token header when an S3 redirect changes scheme from HTTPS to HTTP on the same host. Attackers can intercept plaintext HTTP traffic to capture AWS STS session tokens sent in request headers.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.3
rclone before 1.74.4 Security Token Disclosure via HTTPS to HTTP Redirect
rclone before 1.74.4 fails to strip the X-Amz-Security-Token header when an S3 redirect changes scheme from HTTPS to HTTP on the same host. Attackers can intercept plaintext HTTP traffic to capture AWS STS session tokens sent in request headers.
- Record
CVE-2026-79782- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-319
- Updated
- 2026-11-02
EUVDEUVD-2026-65540
9.3
rclone before 1.74.4 fails to strip the X-Amz-Security-Token header when an S3 redirect changes scheme from HTTPS to HTTP on the same host. Attackers can intercept plaintext HTTP traffic to capture AWS STS session tokens sent in request headers.
- Record
EUVD-2026-65540- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-gx4c-2hqx-cw2r
3.1
rclone: S3 backend does not strip X-Amz-Security-Token on a same-host HTTPS->HTTP redirect
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.
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
- The user configures an
s3remote (or--s3-endpointpointing at a self-hosted/third-party S3-compatible service) using temporary credentials that include an STSsession_token(common for assumed-role / CI / Kubernetes IRSA setups). - The configured endpoint responds to a request with a 3xx redirect to the
same host:port but with
http://instead ofhttps://(TLS-front misconfiguration, maintenance redirect, or a malicious/compromised storage provider trying to harvest the token). - 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. - 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 validity window. This is the exact class
of leak that e7b1eb774 was written to close — it just doesn't cover the
scheme-downgrade axis of "crossing a host".
Vulnerable Code
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
}
Recommended Fix
Also compare URL.Scheme, so a scheme downgrade on the same host is treated
the same as a host change:
func s3RedirectCrossesHost(req *http.Request, via []*http.Request) bool {
if len(via) == 0 {
return false
}
scheme, host := via[0].URL.Scheme, via[0].URL.Host
for _, redirect := range via[1:] {
if redirect.URL.Host != host || redirect.URL.Scheme != scheme {
return true
}
}
return host != req.URL.Host || scheme != req.URL.Scheme
}
Verification
Added a unit test (backend/s3/redirect_scheme_test.go) that calls the real,
unmodified s3RedirectCrossesHost / s3CheckRedirect with an
https://bucket.example.com -> http://bucket.example.com redirect chain.
On unpatched code (commit 16091ce365, current master / v1.74.3):
s3RedirectCrossesHostreturnsfalses3CheckRedirectleavesX-Amz-Security-Token: SECRET-SESSION-TOKENintact on the outgoing (plaintext) request.
=== RUN TestSchemeDowngradeNotDetectedAsCrossHost
redirect_scheme_test.go:23: initial=https://bucket.example.com final=http://bucket.example.com s3RedirectCrossesHost=false
--- PASS: TestSchemeDowngradeNotDetectedAsCrossHost (0.00s)
After applying the one-line fix above (also adding scheme comparison), the
token is correctly stripped and all existing redirect tests
(TestClientRemovesSecurityTokenOnCrossHostRedirect,
TestClientDoesNotRestoreSecurityTokenAfterCrossHostRedirect,
TestClientKeepsSecurityTokenOnSameHostRedirect,
TestClientStopsAfterTenRedirects) continue to pass.
…
- Record
GHSA-gx4c-2hqx-cw2r- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-319, CWE-522
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-mwgh-564g-j9ww
9.3
rclone before 1.74.4 fails to strip the X-Amz-Security-Token header when an S3 redirect changes...
rclone before 1.74.4 fails to strip the X-Amz-Security-Token header when an S3 redirect changes scheme from HTTPS to HTTP on the same host. Attackers can intercept plaintext HTTP traffic to capture AWS STS session tokens sent in request headers.
- Record
GHSA-mwgh-564g-j9ww- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-319
- Updated
- 2026-11-02
NVD
9.3
rclone before 1.74.4 fails to strip the X-Amz-Security-Token header when an S3 redirect changes scheme from HTTPS to HTTP on the same host. Attackers can intercept plaintext HTTP traffic to capture AWS STS session tokens sent in request headers.
- Record
CVE-2026-79782- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-319
- Updated
- 2026-11-02
OSV
9.3
rclone before 1.74.4 Security Token Disclosure via HTTPS to HTTP Redirect
rclone before 1.74.4 fails to strip the X-Amz-Security-Token header when an S3 redirect changes scheme from HTTPS to HTTP on the same host. Attackers can intercept plaintext HTTP traffic to capture AWS STS session tokens sent in request headers.
- Record
CVE-2026-79782- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-319
- Updated
- 2026-11-02
Show 5 moreShow less
OSVDEBIAN-CVE-2026-79782
9.3
rclone before 1.74.4 fails to strip the X-Amz-Security-Token header when an S3 redirect changes scheme from HTTPS to HTTP on the same host. Attackers can intercept plaintext HTTP traffic to capture AWS STS session tokens sent in request headers.
- Record
DEBIAN-CVE-2026-79782- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVGHSA-gx4c-2hqx-cw2r
3.1
rclone: S3 backend does not strip X-Amz-Security-Token on a same-host HTTPS->HTTP redirect
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.
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
- The user configures an
s3remote (or--s3-endpointpointing at a self-hosted/third-party S3-compatible service) using temporary credentials that include an STSsession_token(common for assumed-role / CI / Kubernetes IRSA setups). - The configured endpoint responds to a request with a 3xx redirect to the
same host:port but with
http://instead ofhttps://(TLS-front misconfiguration, maintenance redirect, or a malicious/compromised storage provider trying to harvest the token). - 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. - 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 validity window. This is the exact class
of leak that e7b1eb774 was written to close — it just doesn't cover the
scheme-downgrade axis of "crossing a host".
Vulnerable Code
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
}
Recommended Fix
Also compare URL.Scheme, so a scheme downgrade on the same host is treated
the same as a host change:
func s3RedirectCrossesHost(req *http.Request, via []*http.Request) bool {
if len(via) == 0 {
return false
}
scheme, host := via[0].URL.Scheme, via[0].URL.Host
for _, redirect := range via[1:] {
if redirect.URL.Host != host || redirect.URL.Scheme != scheme {
return true
}
}
return host != req.URL.Host || scheme != req.URL.Scheme
}
Verification
Added a unit test (backend/s3/redirect_scheme_test.go) that calls the real,
unmodified s3RedirectCrossesHost / s3CheckRedirect with an
https://bucket.example.com -> http://bucket.example.com redirect chain.
On unpatched code (commit 16091ce365, current master / v1.74.3):
s3RedirectCrossesHostreturnsfalses3CheckRedirectleavesX-Amz-Security-Token: SECRET-SESSION-TOKENintact on the outgoing (plaintext) request.
=== RUN TestSchemeDowngradeNotDetectedAsCrossHost
redirect_scheme_test.go:23: initial=https://bucket.example.com final=http://bucket.example.com s3RedirectCrossesHost=false
--- PASS: TestSchemeDowngradeNotDetectedAsCrossHost (0.00s)
After applying the one-line fix above (also adding scheme comparison), the
token is correctly stripped and all existing redirect tests
(TestClientRemovesSecurityTokenOnCrossHostRedirect,
TestClientDoesNotRestoreSecurityTokenAfterCrossHostRedirect,
TestClientKeepsSecurityTokenOnSameHostRedirect,
TestClientStopsAfterTenRedirects) continue to pass.
…
- Record
GHSA-gx4c-2hqx-cw2r- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-319, CWE-522
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-79782
9.3
rclone before 1.74.4 fails to strip the X-Amz-Security-Token header when an S3 redirect changes scheme from HTTPS to HTTP on the same host. Attackers can intercept plaintext HTTP traffic to capture AWS STS session tokens sent in request headers.
- Record
UBUNTU-CVE-2026-79782- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
OSVBIT-rclone-2026-79782 No score
rclone before 1.74.4 Security Token Disclosure via HTTPS to HTTP Redirect
rclone before 1.74.4 fails to strip the X-Amz-Security-Token header when an S3 redirect changes scheme from HTTPS to HTTP on the same host. Attackers can intercept plaintext HTTP traffic to capture AWS STS session tokens sent in request headers.
- Record
BIT-rclone-2026-79782- Updated
- 2026-11-02
OSVGO-2026-6196 No score
S3 session token leakage on HTTPS to HTTP redirect in github.com/rclone/rclone
S3 session token leakage on HTTPS to HTTP redirect in github.com/rclone/rclone
- Record
GO-2026-6196- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/rclone/rcloneGo |
through 1.74.3 | 1.74.4 |
rcloneBitnami |
before 1.74.4 | 1.74.4 |
rcloneDebian:12 |
All versions, plus listed versions 1.60.1+dfsg-21.60.1+dfsg-31.60.1+dfsg-41.65.0+dfsg-11.65.0+dfsg-21.69.3+dfsg-11.69.3+dfsg-21.69.3+dfsg-3 |
None known |
rcloneDebian:13 |
All versions, plus listed versions 1.60.1+dfsg-41.65.0+dfsg-11.65.0+dfsg-21.69.3+dfsg-11.69.3+dfsg-21.69.3+dfsg-3 |
None known |
github.com/rclone/rcloneGo |
before 1.74.4 | 1.74.4 |
rcloneUbuntu:18.04:LTS |
All versions, plus listed versions 1.36-31.36-3ubuntu0.11.36-3ubuntu0.2 |
None known |
rcloneUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 1.47.0+ex1-61.47.0+ex1-71.49.5-21.49.5-31.50.2-21.50.2-2ubuntu0.11.50.2-2ubuntu0.21.50.2-2ubuntu0.2+esm1 |
None known |
rcloneUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 1.53.3-11.53.3-21.53.3-41.53.3-4ubuntu11.53.3-4ubuntu1.22.04.1 Show 7 moreShow less1.53.3-4ubuntu1.22.04.21.53.3-4ubuntu1.22.04.31.53.3-4ubuntu1.22.04.3+esm11.53.3-4ubuntu1.22.04.41.53.3-4ubuntu1.22.04.4+esm11.53.3-4ubuntu1.22.04.51.53.3-4ubuntu1.22.04.5+esm1 |
None known |
rcloneUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 1.60.1+dfsg-2build11.60.1+dfsg-31.60.1+dfsg-3ubuntu0.24.04.11.60.1+dfsg-3ubuntu0.24.04.21.60.1+dfsg-3ubuntu0.24.04.3 Show 6 moreShow less1.60.1+dfsg-3ubuntu0.24.04.41.60.1+dfsg-3ubuntu0.24.04.4+esm11.60.1+dfsg-3ubuntu0.24.04.51.60.1+dfsg-3ubuntu0.24.04.5+esm11.60.1+dfsg-3ubuntu0.24.04.61.60.1+dfsg-3ubuntu0.24.04.6+esm1 |
None known |
rcloneUbuntu:26.10 |
All versions, plus listed versions 1.60.1+dfsg-4ubuntu31.69.3+dfsg-31.69.3+dfsg-3ubuntu1 |
None known |
rcloneUbuntu:Pro:26.04:LTS |
All versions, plus listed versions 1.60.1+dfsg-4ubuntu21.60.1+dfsg-4ubuntu31.60.1+dfsg-4ubuntu3.11.60.1+dfsg-4ubuntu3.1+esm11.60.1+dfsg-4ubuntu3.21.60.1+dfsg-4ubuntu3.2+esm1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-79782 is a critical vulnerability (CVSS 9.3) in Rclone, published August 5, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.13%, the 2nd percentile. Fixed in github.com/rclone/rclone 1.74.4.
References
github.com/rclone/rclone/security/advisories/GHSA-gx4c-2hqx-cw2r
vulncheck.com/advisories/rclone-before-security-token-disclosure-via-https-to-http-redirect
github.com/rclone/rclone/commit/1a28451ea6fc8ac1806b0e9923dcb5b3f543f7fa
github.com/rclone/rclone/releases/tag/v1.74.4
github.com/advisories/GHSA-gx4c-2hqx-cw2r
nvd.nist.gov/vuln/detail/CVE-2026-79782
Left out here: the rest of 2 source descriptions. The JSON record has them.