REDHAT-BUG-2590872: Medium severity Red Hat Keycloak vulnerability
A flaw was found in the Keycloak keycloak-services component. The UMA permission grant implementation using the urn:ietf:params:oauth:grant-type:uma-ticket grant type accepts an OIDC ID token as a claim token but fails to correctly validate the subject account status and session state. Specifically, the implementation contains an inverted session-validity check, fails to verify if the user account is enabled, and incorrectly accepts offline sessions in place of online ones. An attacker who possesses valid confidential client credentials and a previously obtained, unexpired ID token can exploit this to mint fresh Requesting Party Tokens RPTs. This allows the attacker to maintain access to protected resources after an administrator has disabled the user account or after the user SSO session has reached its maximum lifespan or idle timeout.
Affected Software
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Deployments using Keycloak UMA permission grants with the urn:ietf:params:oauth:grant-type:uma-ticket grant type are exposed when an attacker has both valid confidential client credentials and a previously obtained, unexpired OIDC ID token.
What does an attacker need to exploit the flaw?
The attacker needs valid credentials for a confidential client and an unexpired ID token obtained previously. Those prerequisites can be used to mint new Requesting Party Tokens (RPTs).
Does disabling the user or expiring the SSO session stop exploitation?
Not reliably. The affected implementation does not correctly validate account enabled status or session validity, and it can accept offline sessions where an online session is required.
How can I tell whether access may persist after a user was disabled or logged out?
Investigate whether fresh RPTs were minted through the UMA ticket grant using an ID token after the associated user account was disabled, or after the user's SSO session exceeded its maximum lifespan or idle timeout.