CVE-2026-9704
Keycloak: keycloak: privilege escalation due to oversized subject_token jwt
- State
- Published
- Severity
- 6.8 Medium
- Published
- May 27, 2026
- Updated
- Jun 26, 2026
- Reserved
- May 27, 2026
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.1 | 6.8 Medium | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N | redhat |
Weaknesses
- CWE-1284 Improper Validation of Specified Quantity in Input
Affected Products
| Product | Versions |
|---|---|
Red Hat build of Keycloak 26.4Red Hat |
|
Red Hat build of Keycloak 26.4Red Hat |
|
Red Hat build of Keycloak 26.4Red Hat |
|
Red Hat build of Keycloak 26.4.13Red Hat | |
Red Hat build of Keycloak 26.6Red Hat |
|
Red Hat build of Keycloak 26.6Red Hat |
|
Red Hat build of Keycloak 26.6Red Hat |
|
Red Hat build of Keycloak 26.6.3Red Hat |
References
- RHSA-2026:25097vendor-advisory
- RHSA-2026:25098vendor-advisory
- RHSA-2026:30049vendor-advisory
- RHSA-2026:30050vendor-advisory
- https://access.redhat.com/security/cve/CVE-2026-9704vdb-entry
- RHBZ#2481877issue-tracking
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.