CVE-2026-9704: Keycloak: keycloak: privilege escalation due to oversized subject_token jwt
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.
Security readout for executives and security teams
Plain-English summary
Keycloak may grant a low-privileged authenticated user the permissions of a client service account when an oversized subject_token JWT is handled incorrectly. The issue is serious for environments where service accounts have broad access, but the CVSS vector rates attack complexity high and no active exploitation is cited in the bundle.
Executive priority
Treat as a prioritized patching item for Keycloak environments, especially identity systems backing sensitive applications. It is not supported as actively exploited, but successful abuse could cross privilege boundaries and expose or alter protected resources.
Technical view
The TokenEndpoint silently drops a subject_token JWT exceeding a 4000-character limit and falls back to client credentials. In affected Red Hat build of Keycloak 26.4 and 26.6 packages, this can turn low-privileged authenticated access into service-account privilege escalation. CVSS is 6.8: network exploitable, low privileges required, no user interaction, high confidentiality and integrity impact.
Likely exposure
Exposure is limited to deployments using the affected Red Hat build of Keycloak 26.4 or 26.6 packages listed in the bundle. Risk depends heavily on whether clients use service accounts and what those service accounts can access.
Exploitation context
The source bundle does not cite public exploitation, proof-of-concept availability, or CISA KEV inclusion. Exploitation requires an authenticated low-privileged user and a specific oversized subject_token condition, which aligns with the high attack-complexity CVSS rating.
Researcher notes
Focus validation on TokenEndpoint behavior, subject_token size handling, and fallback to client credentials. The bundle names CWE-1284 and identifies affected Red Hat package streams, but does not provide detailed patch mechanics or exploit telemetry.
Mitigation direction
Apply relevant Red Hat security advisories for affected Keycloak packages.
Upgrade affected packages to vendor-designated unaffected builds where available.
Review client service-account privileges and reduce excessive permissions.
Monitor Red Hat CVE and errata pages for updated remediation guidance.
Validation and detection
Inventory Red Hat build of Keycloak versions and package names.
Compare installed packages against the affected and unaffected entries in the bundle.
Identify clients with service accounts enabled and high-value permissions.
Review TokenEndpoint authentication logs for abnormal oversized token activity.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-1284: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The CVE wording references privilege impact, so privilege escalation and authorization behavior review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
5Timeline events
1ADP providers
7Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-1284 · source CWE mapping
Improper Validation of Specified Quantity in Input
Improper Validation of Specified Quantity in Input represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.