GitHub Advisoryadvisory · Maven

GHSA-rr5q-3xwr-f323 Keycloak Vulnerable to Improper Validation of Specified Quantity in Input

MEDIUM Published 2026-05-27 Modified 2026-07-01 Official page ↗
Aliases
CVE-2026-9704
Ecosystem
Maven
Packages
org.keycloak:keycloak-server-spi-private, org.keycloak:keycloak-services
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Weaknesses
CWE-1284
Reviewed
2026-07-01

Affected packages

• Maven org.keycloak:keycloak-server-spi-private: < 26.6.3 → fixed in 26.6.3 • Maven org.keycloak:keycloak-services: < 26.6.3 → fixed in 26.6.3

Description

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.

Related

Alias · CVE (1)

Weakness · CWE (1)

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

References