Skip to content
Fencer Vulns
medium 6.8

CVE-2026-9704 json

Keycloak: keycloak: privilege escalation due to oversized subject_token jwt

published 2026-05-27 5 mo ago modified 2026-07-01 4 mo ago also GHSA-rr5q-3xwr-f323 , EUVD-2026-32300

cvss
6.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.3%
EPSS 0.3% chance of exploitation in 30 days, percentile 25%
public exploits
0
none known

Summary

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.

Patch / fix

  • maven org.keycloak:keycloak-server-spi-private 26.6.3
  • maven org.keycloak:keycloak-services 26.6.3
  • Red Hat Red Hat build of Keycloak 26.4 26.4-19, 26.4.13-1
  • Red Hat Red Hat build of Keycloak 26.6 26.6-6, 26.6.3-3

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2026-9704 updated cvss 6.8

keycloak: Keycloak: Privilege escalation due to oversized subject_token JWT

  • Red Hat build of Keycloak 26.4 rhbk/keycloak-rhel9 26.4-19, rhbk/keycloak-rhel9-operator 26.4-19, rhbk/keycloak-operator-bundle 26.4.13-1
    fixed: vendor fix RHSA-2026:30050
  • Red Hat build of Keycloak 26.4.13
    fixed: vendor fix RHSA-2026:30049
  • Red Hat build of Keycloak 26.6 rhbk/keycloak-rhel9 26.6-6, rhbk/keycloak-rhel9-operator 26.6-6, rhbk/keycloak-operator-bundle 26.6.3-3
    fixed: vendor fix RHSA-2026:25097
  • Red Hat build of Keycloak 26.6.3
    fixed: vendor fix RHSA-2026:25098

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
5 mo ago

Exploit prediction

0.32% chance of exploitation in the next 30 days, higher than 25% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 6.8 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
NVD 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub 3.1 6.8 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Affected packages

ecosystem package affected fixed in
maven org.keycloak:keycloak-server-spi-private
<26.6.3
26.6.3
maven org.keycloak:keycloak-services
<26.6.3
26.6.3

Affected products

  • Red Hat Red Hat build of Keycloak 26.4
  • Red Hat Red Hat build of Keycloak 26.4.13
  • Red Hat Red Hat build of Keycloak 26.6
  • Red Hat Red Hat build of Keycloak 26.6.3

Classification

Weakness
  • CWE-1284 Improper Validation of Specified Quantity in Input

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.