# CVE-2026-9704: Keycloak: keycloak: privilege escalation due to oversized subject_token jwt

- Severity: Medium 6.8 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 26% of CVEs (2026-12-02)
- Published: 2026-05-27T12:56:00.858Z
- Modified: 2026-07-01T19:26:31.260Z
- Also known as: GHSA-rr5q-3xwr-f323
- Weaknesses: CWE-1284
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: redhat

## 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.

(As written by CVE List.)

## Affected

- rhbk/keycloak-operator-bundle: no versions given (not affected: from 26.4.13-1 before *; from 26.6.3-3 before *)
- rhbk/keycloak-rhel9: no versions given (not affected: from 26.4-19 before *; from 26.6-6 before *)
- rhbk/keycloak-rhel9-operator: no versions given (not affected: from 26.4-19 before *; from 26.6-6 before *)
- org.keycloak:keycloak-server-spi-private (Maven): before 26.6.3
- org.keycloak:keycloak-services (Maven): before 26.6.3
- redhat build_of_keycloak: no versions given

## Every score

- redhat: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://access.redhat.com/errata/RHSA-2026:25097> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:25098> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:30049> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:30050> (vendor-advisory, web)
- <https://access.redhat.com/security/cve/CVE-2026-9704> (mitigation, vdb-entry, vendor-advisory, web)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2481877> (issue-tracking, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-9704> (advisory)
- <https://github.com/keycloak/keycloak/issues/49435> (web)
- <https://github.com/keycloak/keycloak/pull/49472> (web)
- <https://github.com/keycloak/keycloak/commit/f1e5b7776c42938d0782fd5846346b8f75c815e6> (web)
- <https://github.com/keycloak/keycloak> (package)

## Sources

- CVE List: [CVE-2026-9704](https://www.cve.org/CVERecord?id=CVE-2026-9704), CVE Terms of Use, modified 2026-06-26
- GitHub Advisory Database: [GHSA-rr5q-3xwr-f323](https://github.com/advisories/GHSA-rr5q-3xwr-f323), CC-BY-4.0, modified 2026-07-01
- NVD: [CVE-2026-9704](https://nvd.nist.gov/vuln/detail/CVE-2026-9704), Public domain, modified 2026-06-26

---

Page: https://cve.day/CVE-2026-9704 · Whole record: https://cve.day/CVE-2026-9704.json · Rebuilt by cve.day 2026-11-25T22:59:22.589Z
