Description
A flaw was found in Keycloak. An authenticated user with low privileges can exploit this vulnerability by sending an oversized subject_token JSON Web Token (JWT) to the TokenEndpoint. When the token exceeds a 4000-character limit, it is silently dropped, causing the system to fall back to client credentials. This allows the user to gain the permissions of the client's service account, leading to privilege escalation.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Red Hat | Red Hat build of Keycloak 26.4 | — | — |
| Red Hat | Red Hat build of Keycloak 26.4.13 | — | — |
| Red Hat | Red Hat build of Keycloak 26.6 | — | — |
| Red Hat | Red Hat build of Keycloak 26.6.3 | — | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | keycloak-26.5 +2 | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | org.keycloak:keycloak-server-spi-private | < 26.6.3 | 26.6.3 | GHSA-rr5q-3xwr-f323 |
| Maven | org.keycloak:keycloak-services | < 26.6.3 | 26.6.3 | GHSA-rr5q-3xwr-f323 |
Advisories 1
- WID-SEC-2026-1708 Keycloak: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 8, 2026
References
- RHSA-2026:25097 vendor-advisory
- RHSA-2026:25098 vendor-advisory
- RHSA-2026:30049 vendor-advisory
- RHSA-2026:30050 vendor-advisory
- https://access.redhat.com/security/cve/CVE-2026-9704 vdb-entry
- RHBZ#2481877 issue-tracking