REDHAT-BUG-2577140: Medium severity Red Hat Keycloak vulnerability
When an administrator revokes existing tokens by raising the realm (or
client/user) not-before value, ID tokens issued before that cutoff are still accepted by the UMA grant when they are submitted as a claim token in the ID token format. Keycloak verifies the signature, client and expiration of the ID token but does not enforce the not-before revocation boundary. As long as the user's session is still active, Keycloak builds a new identity from it and issues a fresh Requesting Party Token (RPT) carrying the evaluated authorization permissions. This defeats the administrator's explicit token revocation. The affected endpoint is the token endpoint (POST /realms/{realm}/protocol/openid-connect/token) using the UMA grant (urn:ietf:params:oauth:grant-type:uma-ticket) with claimtokenformat set to the ID token format.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to exploit this issue?
An attacker needs an ID token issued before the applicable realm, client, or user not-before cutoff, and the user's Keycloak session must still be active. The token must be submitted to the token endpoint through the UMA grant with claim_token_format set to the ID token format.
Are all token validation flows affected?
No. The described behavior is limited to the UMA grant at POST /realms/{realm}/protocol/openid-connect/token when an ID token is used as the claim token. In that flow, Keycloak checks the token signature, client, and expiration, but not the not-before revocation boundary.
What is the impact if a revoked ID token is accepted?
Keycloak can build a new identity from the still-active user session and issue a fresh Requesting Party Token containing the evaluated authorization permissions. This bypasses the administrator's explicit token revocation action.