Summary
Ceph RADOS Gateway uses unauthenticated AES-128-CBC encryption to protect STS session tokens, allowing a token holder to alter authorization-related fields without detection. An attacker with any valid STS token may forge administrative privileges and access RGW operations that should require elevated permissions.
Affected context
The vulnerability occurs in Ceph deployments where the RADOS Gateway exposes the S3-compatible endpoint with STS enabled and uses session tokens protected by unauthenticated CBC encryption. It becomes risky when an attacker can obtain any valid STS token, including one without administrative privileges, because token integrity is not verified before authorization decisions are made.
Exploit preconditions
- Attack surface: Remote access to the RGW S3 endpoint
- Required access: A single valid STS session token; elevated privileges are not required
- Trigger point: Token processing during authenticated RGW requests
- Why exploitation is possible: AES-CBC encryption does not authenticate ciphertext, allowing controlled modification of token fields without requiring an encryption oracle or network observation
Why this happens
The underlying flaw is the use of encryption without an integrity mechanism for security-sensitive authorization data. AES-CBC can provide confidentiality but does not detect deliberate ciphertext changes; predictable changes to corresponding plaintext fields may therefore go unnoticed. This maps to CWE-327: Use of a Broken or Risky Cryptographic Algorithm, because the cryptographic construction is unsuitable for protecting authorization claims without authenticated encryption or an equivalent integrity check.
Potential impact
- An attacker could escalate a regular STS session to RGW administrative access.
- Forged authorization fields could bypass capability checks.
- An attacker may read, modify, or delete accessible object-storage data.
- Administrative control could enable broader storage-service disruption or data exposure.
- Compromised credentials could support persistence or lateral abuse of connected systems.
General mitigation guidance
Mitigation generally focuses on ensuring that authorization-bearing tokens are both confidential and integrity-protected.
Common defensive patterns include:
- Using authenticated encryption or a cryptographically strong, independently verified token-integrity mechanism.
- Rejecting tokens whenever authentication tags, signatures, claims, or structural validation fail.
- Avoiding client-controlled authorization fields and deriving privileges from trusted server-side state.
- Applying least privilege to STS identities, service accounts, and administrative interfaces.
- Limiting token lifetime, scope, and audience to reduce the impact of token compromise.
- Rotating or invalidating potentially exposed sessions through established credential-management processes.
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis and cryptographic API reviews that flag CBC encryption without authentication.
- Code review checks for tokens containing privilege or identity claims without signatures or authentication tags.
- Tests that mutate encrypted token bytes and verify reliable rejection.
- Policy enforcement requiring authenticated encryption or approved signing libraries for security-sensitive tokens.
- Monitoring for unusual administrative actions performed by low-privilege STS identities and sudden changes in token-related access patterns.

