Keycloak lets you split administration into narrow roles. An admin who may look at a client’s authorization settings does not automatically get to look at the realm’s users: those are two different permissions. CVE-2026-94213 is a place where that line did not hold. One admin endpoint, the one that evaluates authorization policies, took a user ID from the request, looked that user up and returned their profile and roles to an admin who was not allowed to view users.

We found and reported it as independent research. Red Hat credits the finding to v4yne1 (Syncode) and Maksim Hayder.

Summary

Product
Keycloak, Authorization Services
Weakness
CWE-862, missing authorization
CVSS v3.1
4.9, Medium (Red Hat: Moderate)
Who can exploit it
An admin with view-authorization but not view-users
Fixed in
Keycloak 26.8.1, and 26.6.8 on the 26.6 line
Credit
v4yne1 (Syncode) and Maksim Hayder

Who should care

The bug only matters if some of your Keycloak administrators have less than full realm access. That is common in:

  • Delegated administration. Support staff, application owners or a partner’s admins get view-authorization (or manage-authorization) on a client so they can see and test its policies, without access to the user directory.
  • Multi-tenant setups. One realm holds the users of several customers, and each customer’s admin gets scoped roles, including grants through Fine-Grained Admin Permissions.
  • Automation accounts. Service accounts that manage authorization settings from a pipeline often get the authorization roles and nothing else.

If every admin in a realm is a full realm admin who can already view users, this bug gives them nothing new.

Background: Keycloak admin roles

Keycloak’s admin permissions are client roles on the realm-management client. Some of them:

  • view-users and manage-users cover the user directory.
  • view-clients and manage-clients cover client configuration.
  • view-authorization and manage-authorization cover the Authorization Services settings of clients: resources, scopes, policies and permissions.

These are separate by design. An admin can hold view-authorization without view-users, and in that case a request for a user’s record should fail with 403 Forbidden. The admin console’s Evaluate tab, which lets you test how policies apply to a chosen user, calls the endpoint at the centre of this CVE.

The bug

The endpoint is:

POST /admin/realms/{realm}/clients/{client-uuid}/authz/resource-server/policy/evaluate

It accepts a JSON body with a userId, resolves that user and evaluates the client’s policies for them. In the affected versions, the only permission check is on the resource server, not on the user. Simplified:

// PolicyEvaluationService, before the fix (simplified)
auth.realm().requireViewAuthorization(resourceServer);   // the only check
UserModel user = session.users().getUserById(realm, userId);
AccessToken token = tokenManager.createClientAccessToken(..., user, ...);

// PolicyEvaluationResponseBuilder
response.setRpt(token);   // the user's claims go back to the caller

requireViewAuthorization maps to the view-authorization and manage-authorization roles, which do not include view-users. So the code checks that the caller may view the authorization settings, then resolves any user in the realm and returns the claims Keycloak would put in that user’s token: username, email, first and last name and the full set of realm and client roles.

One detail matters for the impact. The rpt field in the response is a JSON claim set, not a signed token. It discloses who the user is and what they can do. It does not give the caller a credential to act as them.

Reproducing it

The setup: a realm acme, a client with Authorization Services turned on, a user victim with a role called secret-role, and an admin lowadmin who holds only view-authorization from realm-management.

First, two negative controls. As lowadmin, reading the user the normal way fails:

GET /admin/realms/acme/users?username=victim
Authorization: Bearer <lowadmin token>

HTTP/1.1 403 Forbidden
GET /admin/realms/acme/users/7f3c…e21a
Authorization: Bearer <lowadmin token>

HTTP/1.1 403 Forbidden

Then the same admin asks the policy evaluation endpoint about the same user:

POST /admin/realms/acme/clients/{client-uuid}/authz/resource-server/policy/evaluate
Authorization: Bearer <lowadmin token>
Content-Type: application/json

{"userId": "7f3c…e21a", "resources": [], "context": {"attributes": {}}}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "rpt": {
    "preferred_username": "victim",
    "email": "victim@example.com",
    "given_name": "Vic",
    "family_name": "Tim",
    "realm_access": { "roles": ["secret-role", "offline_access", "uma_authorization", "default-roles-acme"] }
  },
  …
}

The two 403 responses show the admin may not read this user. The 200 shows the same data coming back through a different door.

The caller needs the target’s user ID. Keycloak IDs are random UUIDs, so they cannot be guessed, but they are not secret either: they usually appear as the sub claim in the user’s tokens, and they turn up in logs, exports and support tools.

Why this is a vulnerability and not a feature

You could argue that evaluating a policy for a user has to look that user up, so the endpoint works as designed. Keycloak’s own fixes say otherwise. The same problem had already been fixed on neighbouring endpoints:

  • CVE-2026-37978 (public May 2026): the client scope evaluate-scopes endpoints accepted an arbitrary userId, so an admin with view-clients could read other users’ details. The fix added auth.users().requireView(user) before the user is used, in Keycloak 26.6.2.
  • CVE-2026-17059 (public July 2026): the endpoint that lists a role’s members showed users to admins who were not allowed to view them. The fix filters the list to users the admin may view, in 26.7.3 and 26.8.0.

The policy evaluation endpoint does the same thing: it takes a user from the caller, resolves it and returns that user’s data. It was simply not part of either fix. Keycloak’s 26.8.1 release notes describe CVE-2026-94213 as a “possible incomplete fix of CVE-2026-37978”.

Fixed on two endpoints, missed on the third. This is the pattern worth remembering. When a class of bug is reported, the fix usually lands exactly where the report pointed. Endpoints that share the same primitive stay open until someone goes looking for them, and they are often the first place a second researcher looks.

Am I affected?

Check two things: your version, and who holds the authorization roles.

Version. The fix is in Keycloak 26.8.1, and in 26.6.8 on the 26.6 line. No 26.7.x release contains it, so if you run 26.7, upgrade to 26.8.1 or later. Red Hat build of Keycloak users get the fix in 26.6.8 (RHSA-2026:95761). Keycloak has not published an exact affected range; the check is missing in the source of the releases before the fix, and the original report reproduced the issue on 26.7.1.

Exposure. In each realm, look at who holds view-authorization or manage-authorization on realm-management, directly, through a group or through a composite role, and who has authorization grants through Fine-Grained Admin Permissions. Anyone in that list without view-users could read user profiles through this endpoint. If the list is empty, or everyone on it can already view users, you were not exposed in practice.

If your reverse proxy logs admin API traffic, POST requests to …/authz/resource-server/policy/evaluate from accounts that should not see users are worth a look.

Fix and mitigation

Upgrade to Keycloak 26.8.1 or later, or to 26.6.8. After resolving the user, the fixed code calls auth.users().requireView(user) and returns 403 if the caller may not view that user. It also checks that the caller may view the client when the request names a different one.

Until you can upgrade:

  • remove view-authorization and manage-authorization from admins who should not see users, or decide that they may see users and grant view-users openly;
  • keep the admin API reachable only from the networks your administrators actually use.

Lessons for developers

  1. Put object-level checks where the object is resolved. “May this caller see this user?” belongs in the code that turns a caller-supplied ID into a user, not in each endpoint that happens to need one. Then a new endpoint cannot forget it.
  2. When you fix one endpoint, sweep its siblings. Search for every place that takes an ID from the request and resolves it (getUserById and its equivalents), and check each one for the same missing guard. A fix that closes one door is also a map to the others.
  3. Test with a role × endpoint × object matrix. For every role, call every endpoint against an object that role should not reach, and expect 403. Negative controls like the two above are cheap to automate, and they catch exactly this class of bug.

Timeline and credits

  • 7 August 2026: reported privately to the Keycloak project, reproduced on Keycloak 26.7.1.
  • 20 September 2026: Red Hat makes CVE-2026-94213 public; the CVE record is published the next day.
  • 1 October 2026: the fix is merged upstream.
  • 13 October 2026: Keycloak 26.8.1 is released with the fix.
  • 6 November 2026: Red Hat build of Keycloak 26.6.8 ships the fix (RHSA-2026:95761).

Red Hat credits v4yne1 (Syncode) and Maksim Hayder for reporting this issue. The advisory is on Red Hat’s CVE page. Our other published findings are on the CVEs and advisories page.

Testing for this in your own software

The same checks are at the core of our API penetration testing and web application testing: every role, against every endpoint, against objects it should not reach. If you would like that applied to your application, request a pentest scope and quote.