medium

GHSA-8mxv-9xhp-86h4

Go · github.com/rclone/rclone

Summary

rclone: S3 Redirect Sanitization Omits IBM IAM Bearer Tokens and SSE-C Keys

Severity
medium
CVSS
5.3
CWE
CWE-200, CWE-319, CWE-522
Published
2026-08-05
Updated
2026-08-05

Advisory details

1. Summary

The S3 redirect callback strips X-Amz-Security-Token when a redirect changes scheme or host, but it does not strip IBM IAM bearer authorization or customer-provided encryption keys. Two independently validated paths remain:

The High rating is driven by the reusable IBM IAM bearer token. The SSE-C cross-origin disclosure is a secondary confidentiality issue. The meaningful threat is a trusted endpoint, gateway, or accelerator that emits an unsafe redirect, followed by an adjacent/on-path observer; describing the originally configured endpoint itself as the attacker would be weak because that endpoint already receives the request secrets.

2. Affected Assets & Attack Surface

3. Technical Root Cause Analysis

s3CheckRedirect applies a one-header denylist:

if s3RedirectCrossesHost(req, via) {
    req.Header.Del("X-Amz-Security-Token")
}

Go removes Authorization on some hostname changes, but preserves it for a same-host redirect and does not treat a scheme downgrade as sufficient reason to remove it. Go also has no generic knowledge that the SSE-C headers contain raw encryption keys. The rclone callback recognizes the STS token but not these additional origin-bound secrets.

4. Proof-of-Concept & Evidence

Using the actual redirect callback:

  1. An HTTPS endpoint redirected to HTTP on the same hostname.
  2. The plaintext destination received the planted IBM bearer token and SSE-C headers.
  3. A separate redirect to an unrelated hostname caused Go to remove Authorization, but the destination still received both SSE-C key headers.
  4. In both cases, rclone removed the planted STS token, proving that the S3-specific callback executed while omitting the other secret classes.

The related GHSA-gx4c-2hqx-cw2r covers the STS downgrade path and confirms that rclone treats scheme changes as a credential boundary. It does not cover the IBM bearer or SSE-C variants retained here.

5. Impact Assessment

A captured IBM bearer token can authorize reads, writes, and deletes within its IAM scope. A disclosed SSE-C key can expose corresponding ciphertext available to the recipient; copy-source keys can expose protected source objects. The exact impact is limited by token policy and the attacker's access to encrypted objects.

6. Remediation Guidance

References

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.