Executive brief
A security flaw in Keycloak, a popular identity and access management tool, allows certain administrative users to view private information they are not authorized to see. Specifically, an administrator with restricted permissions can bypass security filters to access the names and email addresses of users by viewing role membership lists. This could lead to the unauthorized exposure of sensitive employee or customer data within the organization.
Technical details
An authorization bypass vulnerability exists in the 'role-users' REST API endpoint within the keycloak-services library. The root cause is located in the RoleResource.getRoleUserMembers method, which verifies if a caller has permission to view a specific role but fails to apply per-user view filters to the resulting list. An authenticated attacker with restricted administrative privileges (such as 'query-users' or 'view-realm') can exploit this by requesting the list of users assigned to a role via the GET /admin/realms/{realm}/roles/{role-name}/users endpoint. This allows the attacker to perform unauthorized enumeration of User PII, including usernames, email addresses, and full names, bypassing intended access restrictions.
Affected products
- Red Hat Red Hat Build of Keycloak unspecified
- Keycloak keycloak-services unspecified
Timeline
- 2026-07-24: disclosed: CVE published and reported by Red Hat