CVE-2026-9704Keycloak: keycloak: privilege escalation due to oversized subject_token jwt
- 6.8MediumCVSS base score
- 0.32%Exploitation in 30 daysEPSS · top 75% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By redhat
Published
- 30 days later
· 30 days later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| redhatCNA (assigner) | 3.1 | Medium6.8 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N |
| NVDNVD · Modified | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.32% · top 75% of all CVEs (12 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.8.
Affected products
Red Hat · Red Hat build of Keycloak 26.4
- unaffected 26.4.13-1 – < *
Red Hat · Red Hat build of Keycloak 26.4
- unaffected 26.4-19 – < *
Red Hat · Red Hat build of Keycloak 26.4
- unaffected 26.4-19 – < *
Red Hat · Red Hat build of Keycloak 26.4.13
All versions: unaffected
Red Hat · Red Hat build of Keycloak 26.6
- unaffected 26.6.3-3 – < *
Red Hat · Red Hat build of Keycloak 26.6
- unaffected 26.6-6 – < *
Red Hat · Red Hat build of Keycloak 26.6
- unaffected 26.6-6 – < *
Red Hat · Red Hat build of Keycloak 26.6.3
All versions: unaffected
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Mavenorg.keycloak:keycloak-server-spi-privateGHSA-rr5q-3xwr-f323 (opens in a new tab)
- Mavenorg.keycloak:keycloak-servicesGHSA-rr5q-3xwr-f323 (opens in a new tab)
What to do
Workaround: To prevent the silent dropping of oversized `subject_token` JWTs, configure Keycloak to enforce strict parameter validation. This involves setting the `fail-fast` parameter to `true` for the `TokenEndpoint` configuration, which will cause requests with oversized parameters to be rejected explicitly rather than silently processed with reduced privileges. Consult Keycloak documentation for the exact method to modify these settings. A restart of the Keycloak service may be necessary for the changes to apply.
References
References6
- RHSA-2026:25097 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2026:25098 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2026:30049 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2026:30050 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2026-9704 (opens in a new tab)vdb-entryx_refsource_REDHAT
- RHBZ#2481877 (opens in a new tab)issue-trackingx_refsource_REDHAT
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2026-32300 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-rr5q-3xwr-f323 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2026-9704)Record last updated .