Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Remote token endpoint (AV:N), trivial oversized-JWT trick (AC:L), requires a low-privileged account (PR:L), no user interaction; escalation to service account yields full CIA within the realm.
Primary rating from NVD.
CVSS VectorNVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
6Blast Radius
ecosystem impact- 81 maven packages depend on org.keycloak:keycloak-server-spi-private (45 direct, 36 indirect)
- 70 maven packages depend on org.keycloak:keycloak-services (36 direct, 34 indirect)
Ecosystem-wide dependent count for version 26.6.3 and other introduced versions.
DescriptionNVD
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.
AnalysisAI
Privilege escalation in Red Hat Build of Keycloak allows low-privileged authenticated users to assume the permissions of a client's service account by submitting an oversized subject_token JWT to the TokenEndpoint. When the token exceeds the 4000-character limit it is silently discarded rather than rejected, causing the server to fall back to client-credentials authentication and grant the attacker the client's service-account scope. No public exploit identified at time of analysis and EPSS is very low (0.04%), but CVSS rates the issue 8.8 due to full CIA impact post-exploitation.
Technical ContextAI
Keycloak is Red Hat's open-source identity and access management server implementing OAuth 2.0, OIDC, and SAML, with the affected component being the OAuth2 TokenEndpoint that handles token exchange and grant processing. The root cause maps to CWE-1284 (Improper Validation of Specified Quantity in Input): the endpoint enforces a 4000-character ceiling on the subject_token parameter but, instead of returning an error when the limit is exceeded, silently drops the token and continues processing the request. Because token exchange requests typically also carry client credentials, the server then authenticates the request as the client itself and issues a token bound to the client's service account rather than the original subject - effectively converting a malformed delegation request into a successful client-credentials grant. The CPE confirms the impact applies to cpe:2.3:a:redhat:build_of_keycloak (Red Hat's hardened distribution of upstream Keycloak).
RemediationAI
Patch available per vendor advisory: apply the updates shipped in RHSA-2026:25097 (https://access.redhat.com/errata/RHSA-2026:25097) and RHSA-2026:25098 (https://access.redhat.com/errata/RHSA-2026:25098), which correspond to the patched Red Hat Build of Keycloak releases; exact fix version numbers should be confirmed against the linked errata for your specific Keycloak stream. Until patching is complete, compensating controls include disabling the token-exchange feature on clients that do not require it (this breaks any delegation flows that rely on subject_token swap), restricting which clients are permitted to perform token exchange via the fine-grained admin permission model, tightly scoping each client's service-account roles to the minimum necessary so a fallback to client credentials does not yield administrative permissions, and adding a reverse-proxy or WAF rule that rejects token-endpoint requests whose subject_token parameter exceeds ~4000 characters (trade-off: legitimate large JWTs with many claims may be blocked). Monitor Keycloak audit logs for token-exchange requests that result in client-credentials grants from accounts that previously used a subject_token.
More in Build Of Keycloak
View allA misconfiguration flaw was found in Keycloak. Rated medium severity (CVSS 6.1), this vulnerability is remotely exploita
Keycloak's SAML identity provider broker fails to enforce client disabled status during IdP-initiated SSO flows, allowin
Keycloak's IdentityBrokerService.performLogin endpoint fails to enforce disabled Identity Provider restrictions, allowin
A flaw was found in Keycloak, where it does not properly validate URLs included in a redirect. Rated high severity (CVSS
A vulnerability was found in Undertow where the ProxyProtocolReadListener reuses the same StringBuilder instance across
A vulnerability was found in Wildfly, where a user may perform Cross-site scripting in the Wildfly deployment system. Ra
Stored XSS in Keycloak's organization selection login page allows authenticated administrators with manage-realm or mana
Refresh token replay in Keycloak allows a remote attacker who has previously captured a user's refresh token to reuse th
Privilege escalation in Keycloak's Fine-Grained Admin Permissions v2 (FGAPv2) allows administrative users with the manag
A vulnerability was found in Keycloak. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploitable, no
An open redirect vulnerability was found in Keycloak. Rated medium severity (CVSS 6.1), this vulnerability is remotely e
A flaw was found in Keycloak. Rated medium severity (CVSS 5.4), this vulnerability is remotely exploitable, no authentic
Same technique Privilege Escalation
View allVendor StatusVendor
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-32300
GHSA-rr5q-3xwr-f323