Skip to content

fix: guard SSE replication headers against injection (CVE-2026-34204)#23

Merged
sergiodj merged 1 commit into
masterfrom
fix/cve-2026-34204-sse-metadata-injection
May 1, 2026
Merged

fix: guard SSE replication headers against injection (CVE-2026-34204)#23
sergiodj merged 1 commit into
masterfrom
fix/cve-2026-34204-sse-metadata-injection

Conversation

@8none1

@8none1 8none1 commented Apr 30, 2026

Copy link
Copy Markdown

Summary

extractMetadataFromMime() in cmd/handler-utils.go accepts any header listed in supportedHeaders, 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 via replicationToInternalHeaders.

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 supportedHeaders loop in extractMetadataFromMime(). Headers that map through replicationToInternalHeaders are only accepted when the request carries X-Minio-Source-Replication-Request, which is set exclusively by MinIO's internal replication system.

isReplicationReq := len(nv[http.CanonicalHeaderKey(xhttp.MinIOSourceReplicationRequest)]) > 0

Non-replication requests that supply these headers will have them silently dropped.

Notes

/cc @sergiodj for review

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 sergiodj left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sergiodj sergiodj merged commit 624d9a2 into master May 1, 2026
18 of 21 checks passed
@sergiodj sergiodj deleted the fix/cve-2026-34204-sse-metadata-injection branch May 1, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants