CVE-2025-62506: MinIO is Vulnerable to Privilege Escalation via Session Policy Bypass in Service Accounts and STS
8.1
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/minio/minio | go | < 0.0.0-20251015170045-c1a49490c78e | 0.0.0-20251015170045-c1a49490c78e |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability allows a service account or an STS account with a restrictive session policy to create a new service account without those restrictions, effectively escalating its privileges. This is caused by a flaw in the IAM policy validation logic within MinIO.
The analysis of the patch c1a49490c78e9c3ebcad86ba0662319138ace190 reveals that the root cause lies in the handling of the DenyOnly flag within the isAllowedBySessionPolicyForServiceAccount and isAllowedBySessionPolicy functions located in cmd/iam.go.
For operations that a user performs on their own account (e.g., creating a service account for themselves), the DenyOnly flag is set to true. This typically means the operation is allowed as long as there isn't an explicit "Deny" rule. However, when a restrictive session policy is in place, the logic should have been to check if the action is explicitly allowed by that session policy. Instead, the vulnerable code continued to honor the DenyOnly=true flag, checking only for denials, which are unlikely to be present in a restrictive allow policy. This effectively bypassed the session policy.
The fix involves explicitly setting DenyOnly = false within these two functions whenever a session policy is being evaluated. This forces the subsequent policy check (subPolicy.IsAllowed) to validate that the action is explicitly permitted by the session policy, closing the privilege escalation vector. Therefore, these two functions are the direct locations of the vulnerability and would be on the execution path when this vulnerability is triggered.
Vulnerable functions
isAllowedBySessionPolicyForServiceAccountcmd/iam.go
isAllowedBySessionPolicycmd/iam.go