Skip to main content

Keycloak EUVDEUVD-2026-32300

| CVE-2026-9704 HIGH
Improper Validation of Specified Quantity in Input (CWE-1284)
2026-05-27 secalert@redhat.com GHSA-rr5q-3xwr-f323
8.8
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate as low-privileged realm user
  2. Delivery
    Identify client with token-exchange enabled and privileged service account
  3. Exploit
    Craft token-exchange request with oversized subject_token JWT (>4000 chars)
  4. Install
    Submit to TokenEndpoint, oversized token silently dropped
  5. C2
    Server falls back to client-credentials grant
  6. Execute
    Receive access token bound to client service account
  7. Impact
    Invoke privileged APIs with escalated scope

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Input size validation
Exploitation Conditions

The attacker needs valid authentication to the Keycloak realm at low privilege (PR:L) and must be able to authenticate as, or on behalf of, a confidential or public OAuth client that has the token-exchange grant enabled - token exchange is not enabled by default on every client, so realms that have never configured token exchange are not exposed via this code path. Exploitation also requires that the targeted client has a service account whose roles are more privileged than the attacker's own user, otherwise the 'escalation' yields no net gain. No user interaction is required (UI:N), the attack is fully remote over the network to the Keycloak token endpoint (AV:N), and complexity is low (AC:L) - the attacker just inflates the subject_token JWT past 4000 characters. Limiting factors: requires an existing account, requires token-exchange to be enabled on a reachable client, and the practical impact is bounded by the service account's role assignments.

Impact

Signals are mixed and lean toward a credible but not urgent priority. CVSS 8.8 (AV:N/AC:L/PR:L/UI:N) reflects network-reachable exploitation with low complexity, only low privileges required, and full confidentiality/integrity/availability impact on the realm - meaningful because the attacker pivots to a service-account identity with potentially broad scopes. However, EPSS is only 0.04% (11th percentile) and CISA SSVC scores Exploitation: none and Automatable: no, indicating no observed in-the-wild activity and no straightforward mass-exploitation pathway; Technical Impact is rated total, consistent with the privilege-escalation outcome. Real-world risk depends heavily on how privileged the target client's service account is - a client whose service account holds realm-admin or sensitive resource-server roles makes this a critical issue, whereas a client with minimal service-account scopes makes it a low-impact bug. No public exploit identified at time of analysis, and no KEV listing.

Exploit ScenarioDerived

An attacker who has obtained any low-privileged Keycloak user account (for example via self-registration in a realm that allows it, or through compromise of a non-privileged employee account) sends a crafted POST to the OAuth2 TokenEndpoint requesting a token-exchange grant, attaching client credentials for any client they can authenticate as and a subject_token JWT padded beyond 4000 characters. The server silently drops the oversized subject_token and falls back to client credentials, returning an access token bound to that client's service account; the attacker then uses that token to call APIs or Keycloak admin endpoints with the service account's roles. No public exploit identified at time of analysis, but the technique is straightforward to script once the behavior is understood.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jun 10, 2026

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.

Earlier versions of this analysis (2)
v2 Jun 10, 2026 - 22:33 cvss changed CVSS 8.8

Privilege escalation in Red Hat Build of Keycloak allows an authenticated low-privileged user to assume the permissions of a client's service account by submitting an oversized subject_token JWT (greater than 4000 characters) to the TokenEndpoint, which is silently discarded and causes the server to fall back to client credentials. The flaw carries a CVSS 8.8 (High) score but no public exploit identified at time of analysis, an EPSS of 0.04%, and CISA SSVC reports no observed exploitation despite a 'total' technical impact rating.

v1 May 27, 2026 - 21:17 CVSS 6.8

Privilege escalation in Keycloak exposes service account permissions to authenticated low-privilege users through a silent JWT size-check failure at the TokenEndpoint. When a subject_token JWT exceeding 4000 characters is submitted, Keycloak silently discards it and falls back to client credentials - granting the attacker the permissions of the client's service account without any explicit authorization decision. SSVC rates technical impact as total (full confidentiality and integrity compromise), though CVSS AC:H and no public exploit identified at time of analysis temper the immediacy of widespread exploitation. This is a Red Hat-reported issue tracked in their Bugzilla at #2481877.

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.

Affected Packages

maven org.keycloak:keycloak-server-spi-private fix: 26.6.3
maven org.keycloak:keycloak-services fix: 26.6.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in maven

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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

Know when Build Of Keycloak gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

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.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat 6.8 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

4
Analysis Updated
Jun 10, 2026 - 22:34 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 10, 2026 - 22:33 vuln.today
v2 - CVSS changed
Severity Changed
Jun 10, 2026 - 22:22 NVD
MEDIUM HIGH
CVSS changed
Jun 10, 2026 - 22:22 NVD
6.8 (MEDIUM) 8.8 (HIGH)

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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.

Executive ViewAI

Why It Matters

Red Hat Build of Keycloak contains a privilege escalation vulnerability (CVE-2026-9704) allowing authenticated users to assume the permissions of critical service accounts, creating a direct pathway to unauthorized access of downstream systems and sensitive data. Organizations using Keycloak for identity management face elevated risk where service accounts hold elevated privileges to critical infrastructure or data systems. With no vendor patch currently available and high CVSS severity (8.8), immediate compensating controls are essential to prevent unauthorized service account activity and potential data exposure.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Implement WAF or firewall rules to block JWT tokens exceeding 4000 characters at TokenEndpoint; (2) Restrict TokenEndpoint network access to only pre-approved applications and internal systems; (3) Enable comprehensive audit logging for all service account authentication attempts and permission assertions; (4) Conduct immediate audit of service account permissions and remove any exceeding least-privilege requirements; (5) Deploy real-time monitoring and alerting for suspicious TokenEndpoint access patterns, repeated authentication failures, or unusual service account activity; (6) If operationally feasible, temporarily disable subject_token-based authentication methods pending patch release.

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

Affected Products (CPE)NVD

cpe:2.3:a:redhat:build_of_keycloak:-:*:*:*:-:*:*:*
CVE-2024-8883 MEDIUM POC
6.1 Sep 19

A misconfiguration flaw was found in Keycloak. Rated medium severity (CVSS 6.1), this vulnerability is remotely exploita

CVE-2026-3047 HIGH
8.8 Mar 05

Keycloak's SAML identity provider broker fails to enforce client disabled status during IdP-initiated SSO flows, allowin

CVE-2024-1132 HIGH POC
8.1 Apr 17

A flaw was found in Keycloak, where it does not properly validate URLs included in a redirect. Rated high severity (CVSS

CVE-2026-9689 MEDIUM POC
4.2 May 27

HTTP parameter pollution in Keycloak enables authentication bypass against deployments where OAuth/OIDC client applicati

CVE-2026-3009 HIGH
8.1 Mar 05

Keycloak's IdentityBrokerService.performLogin endpoint fails to enforce disabled Identity Provider restrictions, allowin

CVE-2024-7885 HIGH
7.5 Aug 21

A vulnerability was found in Undertow where the ProxyProtocolReadListener reuses the same StringBuilder instance across

CVE-2024-7341 HIGH
7.1 Sep 09

A session fixation issue was discovered in the SAML adapters provided by Keycloak. Rated high severity (CVSS 7.1), this

CVE-2024-10234 HIGH
7.3 Oct 22

A vulnerability was found in Wildfly, where a user may perform Cross-site scripting in the Wildfly deployment system. Ra

CVE-2026-9802 MEDIUM
6.8 May 28

Refresh token replay in Keycloak allows a remote attacker who has previously captured a user's refresh token to reuse th

CVE-2025-7784 MEDIUM
6.5 Jul 18

Privilege escalation in Keycloak's Fine-Grained Admin Permissions v2 (FGAPv2) allows administrative users with the manag

CVE-2024-4629 MEDIUM
6.5 Sep 03

A vulnerability was found in Keycloak. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploitable, no

CVE-2024-7260 MEDIUM
6.1 Sep 09

An open redirect vulnerability was found in Keycloak. Rated medium severity (CVSS 6.1), this vulnerability is remotely e

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy