NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Maven

CVE-2026-9704: Keycloak Vulnerable to Improper Validation of Specified Quantity in Input

mediumCVSS 3.1 6.8GHSA-rr5q-3xwr-f323

A flaw was found in Keycloak. An authenticated user with low privileges can exploit this vulnerability by sending an oversized subjecttoken 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.

Published May 27, 2026 · Updated Jul 1, 2026

Affected packages

org.keycloak:keycloak-server-spi-private

Ecosystem
Maven
Affected
< 26.6.3
Fixed in
26.6.3
Check
mvn dependency:tree -Dincludes=org.keycloak:keycloak-server-spi-private

org.keycloak:keycloak-services

Ecosystem
Maven
Affected
< 26.6.3
Fixed in
26.6.3
Check
mvn dependency:tree -Dincludes=org.keycloak:keycloak-services

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Maven vulnerabilities

All Maven entries