Vulnerability · Published May 27, 2026 · Assigned by redhat
CVE-2026-9704Keycloak: keycloak: privilege escalation due to oversized subject_token jwt
Medium 6.8
In plain English
A medium-severity security flaw in Red Hat build of Keycloak 26.4 from Red Hat. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 25% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | org.keycloak:keycloak-server-spi-private | 26.6.3 | GHSA-rr5q-3xwr-f323 |
| Maven | org.keycloak:keycloak-services | 26.6.3 | GHSA-rr5q-3xwr-f323 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Red Hat | Red Hat build of Keycloak 26.4 | see references |
| Red Hat | Red Hat build of Keycloak 26.4 | see references |
| Red Hat | Red Hat build of Keycloak 26.4 | see references |
| Red Hat | Red Hat build of Keycloak 26.4.13 | see references |
| Red Hat | Red Hat build of Keycloak 26.6 | see references |
| Red Hat | Red Hat build of Keycloak 26.6 | see references |
| Red Hat | Red Hat build of Keycloak 26.6 | see references |
| Red Hat | Red Hat build of Keycloak 26.6.3 | see references |
Weakness: CWE-1284 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
References
- RHSA-2026:25097 vendor-advisory, x_refsource_REDHAT
- RHSA-2026:25098 vendor-advisory, x_refsource_REDHAT
- RHSA-2026:30049 vendor-advisory, x_refsource_REDHAT
- RHSA-2026:30050 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2026-9704 vdb-entry, x_refsource_REDHAT
- RHBZ#2481877 issue-tracking, x_refsource_REDHAT