CVE-2026-9791 is a medium-severity (CVSS 4.3) CWE-863 vulnerability in org.keycloak:keycloak-server-spi-private. A fix is available for org.keycloak:keycloak-server-spi-private — see the affected versions and patch details below.
Keycloak Vulnerable to Incorrect Authorization
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-9791.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-9791 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 384,993 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.keycloak:keycloak-server-spi-private☕org.keycloak:keycloak-services☕org.keycloak:keycloak-server-spi-private☕org.keycloak:keycloak-servicesReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
A flaw was found in Keycloak. An authenticated user with existing organization membership can exploit this flaw by accessing user-facing APIs, such as the account API or by requesting an OpenID Connect (OIDC) token with the 'organization' scope. This allows organization metadata to be disclosed in tokens, even after an administrator has explicitly disabled the Organizations feature, potentially leading to incorrect authorization decisions by resource servers.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.keycloak:keycloak-server-spi-private | ≥ 26.5.0&&< 26.6.3 | 26.6.3org.keycloak:keycloak-server-spi-private:26.6.3 |
| ☕Maven | org.keycloak:keycloak-services | ≥ 26.5.0&&< 26.6.3 | 26.6.3org.keycloak:keycloak-services:26.6.3 |
| ☕Maven | org.keycloak:keycloak-server-spi-private | all versions | No fix |
| ☕Maven | org.keycloak:keycloak-services | all versions | No fix |
Affected Products
build of keycloakredhatDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.keycloak:keycloak-server-spi-private, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.keycloak:keycloak-server-spi-private to 26.6.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-9791 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Keycloak fails to enforce the disabled state of the Organizations feature on user-facing APIs, allowing authenticated users to retrieve organization membership data and obtain tokens with organization claims even after an administrator has disabled the feature at the realm level.
Administrators should verify that disabling the Organizations feature properly blocks all organization-related functionality. Consider implementing additional access controls or removing organization memberships before disabling the feature.Source: Red Hat security advisory for CVE-2026-9791 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat build of Keycloak 26.4 | rhbk/keycloak-operator-bundle:26.4.13-1 | RHSA-2026:30050 |
| Red Hat build of Keycloak 26.4.13 | rhbk/keycloak-rhel9 | RHSA-2026:30049 |
| Red Hat build of Keycloak 26.6 | rhbk/keycloak-operator-bundle:26.6.3-3 | RHSA-2026:25097 |
| Red Hat build of Keycloak 26.6.3 | rhbk/keycloak-rhel9 | RHSA-2026:25098 |
Frequently Asked Questions
Is CVE-2026-9791 in your dependencies?
Find it across Maven, including transitive dependencies.