REDHAT-BUG-2577148: Low severity Red Hat Keycloak vulnerability
The Account API lets a resource owner share an owned resource through
PUT /realms/{realm}/account/resources/{id}/permissions. This endpoint does not check whether owner-managed access is enabled for the resource, and it accepts any scope defined on the resource server, including scopes that are not assigned to the shared resource. The endpoint creates an already-granted permission ticket for that scope. When the requesting party then sends a ticketless UMA authorization request, Keycloak treats the granted ticket as authoritative, skips policy evaluation, and issues a Requesting Party Token (RPT) containing the unauthorized resource and scope. The corresponding Protection API path performs both checks, so the Account API is inconsistent with it. The impact is limited to resources owned by the attacker, and no access to another user's data was demonstrated.
Affected Software
Event History
Frequently Asked Questions
What does an attacker need in order to exploit this issue?
The attacker must be the resource owner and be able to use the Account API endpoint to share that resource. They can then request scopes defined on the resource server even when those scopes are not assigned to the resource being shared.
Can this be used to access resources owned by other users?
No access to another user's data was demonstrated. The documented impact is limited to resources owned by the attacker.
Why does the unauthorized scope appear in the resulting token?
The Account API creates an already-granted permission ticket for the requested scope. A subsequent ticketless UMA authorization request treats that ticket as authoritative, skips policy evaluation, and can issue an RPT containing the resource and unauthorized scope.
Does the same issue affect the Protection API sharing path?
The corresponding Protection API path performs the owner-managed-access and scope checks. The inconsistency is specifically that the Account API endpoint does not perform those checks.