Build Of KeycloakApplication · Redhat

CVE-2026-9795

HIGH · 7.3 CVSS v3.1 Published 2026-05-28
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
77/100
Remediation priority · High
Remotely reachable

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
A flaw was found in Keycloak's Fine-Grained Admin Permissions (FGAPv2) feature. An administrator with limited client management permissions can exploit this vulnerability to assign any realm role, including highly privileged roles, to a client's scope mapping. This bypasses intended security controls, allowing the injected role to be projected into a user's authentication token when they access the modified client. This could lead to unauthorized privilege escalation within the Keycloak realm.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

This vulnerability exploits Keycloak's Fine-Grained Admin Permissions (FGAPv2) feature, allowing administrators with limited client management permissions to assign privileged realm roles to client scope mappings. This bypasses intended security boundaries and causes elevated roles to be included in user authentication tokens, resulting in privilege escalation.

MitigationApply the official Keycloak patch for CVE-2026-9795 and audit existing admin role assignments to detect any unauthorized privilege escalation that may have occurred.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Build Of KeycloakApplication
Affected:all versions

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
High
Privileges
High
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify Keycloak installation and version
    Locate the Keycloak installation and determine its version by checking the server startup logs, the 'kc.sh version' or 'kc.bat version' command output, or the pom.xml/build.gradle if source-built. Compare against the affected version range (all versions of Red Hat Build of Keycloak).
    Affected if The installed version is any version of Red Hat Build of Keycloak and FGAPv2 admin permissions are configured.
  2. Confirm FGAPv2 feature is enabled
    Review the Keycloak realm settings or admin console under 'Realm Settings > Feature Flags' or the 'features' property in the 'standalone.xml'/'standalone-ha.xml' configuration file. Look for 'admin-fine-grained-authz' or similar Fine-Grained Admin Permissions configuration.
    Affected if FGAPv2 (Fine-Grained Admin Permissions) feature is enabled in the Keycloak deployment.
  3. Review client scope mappings for privileged realm roles
    Using the Keycloak Admin API or Admin Console, iterate through all client scopes and examine their scope mappings. Specifically check client scopes associated with clients where the 'Scope' parameter includes realm roles. Identify any client scopes that contain highly privileged realm roles (such as 'admin', 'offline_access', 'uma_authorization', or custom privileged roles) that should not be automatically granted via client scope.
    Affected if Any client scope mappings include privileged realm roles that were not intentionally assigned by full administrators.
  4. Audit admin users with limited client management permissions
    Query the realm's admin users and filter for those who have 'client-management' or 'manage-clients' permissions but do not have full 'admin' or 'realm-admin' privileges. Review their recent administrative actions via the Admin API audit logs or the 'Events' configuration in Keycloak.
    Affected if An administrator with only client management permissions has modified client scope mappings to include privileged realm roles.
  5. Inspect authentication tokens for unexpected elevated roles
    Use the Keycloak Admin API to query user sessions or intercept a test user's JWT access token (via the UserInfo endpoint or browser dev tools after authentication). Decode the JWT and examine the 'roles' or 'realm_access.roles' claim. Compare against the expected roles that user should possess.
    Affected if User authentication tokens contain elevated roles (such as 'admin' or other privileged realm roles) that were not explicitly assigned to those users.

You are affected if you run any version of Red Hat Build of Keycloak with FGAPv2 enabled and have administrators who can modify client scope mappings to inject privileged realm roles into user tokens.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Apply the official Keycloak patch for CVE-2026-9795 and audit existing admin role assignments to detect any unauthorized privilege escalation that may have occurred.

Fix this in Build Of Keycloak Scoped from the published advisory
  • Consultation3.0 h
  • Implementation3.0 h
  • Testing3.0 h
  • Review / QA2.0 h
11.0 hours of engineering $1,950
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,120.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-9795 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-9795 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data