fix: guard SSE replication headers against injection (CVE-2026-34204)#23
Merged
Merged
Conversation
A regular client could supply X-Minio-Replication-Server-Side-Encryption-* headers in a PUT request, causing them to be stored as internal SSE metadata. This allowed injection of fake sealed key material, potentially bypassing SSE verification. Add a check in extractMetadataFromMime() to only accept headers in replicationToInternalHeaders when the request carries the X-Minio-Source-Replication-Request header, which is only set by MinIO's internal replication system.
sergiodj
approved these changes
May 1, 2026
sergiodj
left a comment
There was a problem hiding this comment.
Thanks, Will!
Claude has made a few suggestions when reviewing this PR, but I believe we can proceed with what we have and I can file a new PR later to improve on testing/etc.
This was referenced May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extractMetadataFromMime()incmd/handler-utils.goaccepts any header listed insupportedHeaders, which includes the SSE replication headers (X-Minio-Replication-Server-Side-Encryption-Sealed-Key,-Seal-Algorithm,-Iv,X-Minio-Replication-Encrypted-Multipart, etc.). These get stored as internal object metadata viareplicationToInternalHeaders.A regular client can include these headers in a PUT request, injecting fake sealed key material into object metadata. This can cause the server to treat an unencrypted object as SSE-encrypted, or to use attacker-controlled key material — bypassing SSE verification.
Fix
Add a replication request guard at the top of the
supportedHeadersloop inextractMetadataFromMime(). Headers that map throughreplicationToInternalHeadersare only accepted when the request carriesX-Minio-Source-Replication-Request, which is set exclusively by MinIO's internal replication system.Non-replication requests that supply these headers will have them silently dropped.
Notes
/cc @sergiodj for review