GHSA-56wq-x3wv-3ff4: Path Traversal
Summary The SeaweedFS S3 API gateway did not reject .. path segments in the X-Amz-Copy-Source header used by CopyObject and UploadPartCopy. The request URL path was hardened against traversal in 4.30 (CVE-2026-54917), but the copy-source header was only checked for emptiness, so a .. segment in the copy source survived into the server-side filer path and resolved into a different bucket.
Impact A confused-deputy authorization bypass that breaks bucket isolation. IAM evaluates the caller's policy against the bucket named in the request URL (the destination the caller owns), while the copy reads its source from the traversed target bucket. An identity scoped to a single bucket (Read + Write on one bucket it controls) can therefore read any object in any bucket on the instance and land the result in its own bucket.
For example, a caller authorized only for bucket-a issues a CopyObject into bucket-a with copy source bucket-a/../<victim-bucket>/<key>; the gateway reads <victim-bucket>/<key> and writes it to the attacker-controlled destination, from which the caller reads it normally. UploadPartCopy (CopyObjectPartHandler) is affected by the same vector.
Affected versions All releases prior to 4.34. The 4.30 fix for CVE-2026-54917 hardened the request URL path but not the X-Amz-Copy-Source header.
Patched version 4.34 and later.
Remediation Upgrade to 4.34 or later. The fix validates the copy-source bucket and object key with the same IsValidBucketName / IsValidObjectKey guards already applied to the request URL, rejecting traversal segments before the handler runs, and applies the same check to UploadPartCopy.
Workaround No configuration workaround. For deployments that cannot upgrade immediately, front the gateway with a reverse proxy that rejects requests whose X-Amz-Copy-Source header contains .., %2e%2e, or backslash sequences.
References - Fix: https://github.com/seaweedfs/seaweedfs/pull/9929 (commit b44cf51fe931bd75aa4d37ae766bea90d7f85ccd)
Credit Reported responsibly by @47Cid.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/seaweedfs/seaweedfsto a version that resolves this vulnerability.Fixed in 0.0.0-20260612000715-b44cf51fe931 - Upgrade
Upgrade
seaweedfs/seaweedfsto a version that resolves this vulnerability.Fixed in 4.34 - Compensating control
For deployments that cannot upgrade immediately, front the SeaweedFS S3 gateway with a reverse proxy that rejects requests whose `X-Amz-Copy-Source` header contains `..`, `%2e%2e`, or backslash (`\`) sequences.
Event History
Frequently Asked Questions
Does the earlier request-path hardening protect against this issue?
No. The request URL path was hardened in version 4.30 for CVE-2026-54917, but the X-Amz-Copy-Source header remained insufficiently validated and can carry the traversal sequence.
What access does an attacker need to retrieve data from another bucket?
The attacker needs an identity with Read and Write permissions on a bucket they control. They can submit a CopyObject or UploadPartCopy request targeting that permitted destination while using a traversing copy-source value to read an object from another bucket on the same instance.
Which operations should be considered exposed when assessing use of the S3 gateway?
CopyObject and UploadPartCopy are affected. The issue applies when the S3 API gateway processes X-Amz-Copy-Source values containing .. path segments.