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

Read the record on cve.org

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

CVSSScoreVectorSource
3.16.8 MediumCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:Nredhat

Weaknesses

  • CWE-1284 Improper Validation of Specified Quantity in Input

Affected Products

ProductVersions
Red Hat build of Keycloak 26.4Red Hat
  • 26.4.13-1 and laterNot affected
Red Hat build of Keycloak 26.4Red Hat
  • 26.4-19 and laterNot affected
Red Hat build of Keycloak 26.4Red Hat
  • 26.4-19 and laterNot affected
Red Hat build of Keycloak 26.4.13Red Hat
    Red Hat build of Keycloak 26.6Red Hat
    • 26.6.3-3 and laterNot affected
    Red Hat build of Keycloak 26.6Red Hat
    • 26.6-6 and laterNot affected
    Red Hat build of Keycloak 26.6Red Hat
    • 26.6-6 and laterNot affected
    Red Hat build of Keycloak 26.6.3Red Hat

      References

      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.