Live Active security incident? Get immediate response
CVE Record

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.

MediumCVSS 6.8Not KEV-listed Updated
Glexia's Take moderate

Analyst readout for executives and security teams

Plain-English summary

This Keycloak flaw lets a logged-in low-privilege user trigger an authentication fallback that can grant the client service account's permissions. Business risk depends on how powerful those service accounts are. The source bundle does not name a fixed version or active exploitation.

Executive priority

Prioritize review this week for environments where Keycloak service accounts can access sensitive data or administrative functions. The CVSS is medium, but privilege escalation to over-permissioned service accounts can create high business impact.

Technical view

The TokenEndpoint mishandles an oversized subject_token JWT. When the token exceeds a 4000-character limit, it is silently dropped and processing falls back to client credentials, allowing privilege escalation to the client's service account. Red Hat maps this to CWE-1284 and CVSS 6.8.

Likely exposure

Exposure is limited to Red Hat Build of Keycloak deployments, specifically the rhbk/keycloak-rhel9 package listed as affected. The bundle provides no affected version range, so teams should treat installed Red Hat Build of Keycloak instances as requiring vendor verification.

Exploitation context

The attack requires an authenticated low-privilege user and high attack complexity. No KEV listing or cited source in the bundle supports active exploitation. Impact can be serious where client service accounts hold broad permissions.

Researcher notes

Evidence supports a logic/validation failure around subject_token size handling and fallback behavior. The source bundle does not provide fixed versions, affected version ranges, public exploit status, or vendor workaround details beyond the Red Hat references.

Mitigation direction

  • Check Red Hat guidance for fixed builds or official workarounds.
  • Inventory Red Hat Build of Keycloak rhbk/keycloak-rhel9 deployments.
  • Reduce service-account permissions for affected clients where business-safe.
  • Limit TokenEndpoint access to trusted authenticated clients where feasible.
  • Monitor vendor advisories for version-specific remediation details.

Validation and detection

  • Confirm whether deployed Keycloak builds match Red Hat Build of Keycloak.
  • Review clients with enabled service accounts and elevated permissions.
  • Check authentication logs for abnormal TokenEndpoint requests with oversized subject_token values.
  • Track Red Hat CVE and Bugzilla updates for affected version details.
  • Verify compensating controls do not break required authentication flows.
Prepared
Confidence
medium
Sources
4

Based on public source material and reviewed before publication.

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.

Open ATT&CK lookup
description · low confidence lookup

Credential and access behavior lookup

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.

Open ATT&CK lookup
description · low confidence lookup

Privilege behavior lookup

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.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-9704 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profile CVE Program record
Severity
Medium
CVSS
6.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

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.

1 CVSS vectors
5 Timeline events
1 ADP providers
3 Source links

SSVC decision data

CISA-ADP CISA 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.

Score Version Severity Vector Exploit Impact Source
6.8 CVSS 3.1 Medium CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N 1.6 5.2 redhat

Vulnerability scoring details

Base CVSS 3.1 score

6.8 Medium
CVSS 3.1 vector shape for CVE-2026-9704 Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. Source timeline redhat

    Reported to Red Hat.

  2. CVE reserved CVE Program

    The CVE ID was reserved by the assigning CNA.

  3. Source timeline redhat

    Made public.

  4. CVE published CVE Program

    The CVE record was published.

  5. CVE updated CVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADP CISA ADP Vulnrichment
other:ssvc

Source materials

Affected products

Products and packages named in the record

Vendor Product Version / package Status
Red Hat Red Hat Build of Keycloak rhbk/keycloak-rhel9 affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-1284 · source CWE mapping

CWE mapping pending import

This CVE carries a CWE mapping that will resolve to a full Glexia CWE intelligence page after the official CWE import is complete.