CVE-2026-133226: Org.keycloak:keycloak-services: org.keycloak:keycloak-server-spi-private: account resource sharing grants scopes outside the resource definition
A flaw was found in Keycloak. The Account API endpoint for sharing resources fails to verify whether owner-managed access is enabled and accepts permission scopes not assigned to the resource. An authenticated user can exploit this vulnerability to generate pre-granted permission tickets, causing Keycloak to bypass policy evaluation and issue access tokens with unauthorized scopes.
Other sources
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.
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What does an attacker need to exploit this issue?
The attacker must be an authenticated Keycloak user who owns the target resource. They can use the Account API sharing endpoint to create a pre-granted permission ticket for a scope defined on the resource server, even if that scope is not assigned to their resource.
Can this be used to gain access to resources owned by other users?
The impact is limited to resources owned by the attacker. The flaw allows unauthorized scopes to be added to access tokens for those attacker-owned resources.
Why does the Account API behavior matter for authorization?
A ticketless UMA authorization request can treat the pre-granted ticket as authoritative, skip policy evaluation, and issue an RPT containing the unauthorized resource and scope. The Protection API performs the owner-managed-access and resource-scope checks that the Account API omits.