PoC Monitor
← All CVEs
CVE-2026-9704published 27 May 2026 12:56 UTCData: JSON · API

Red Hat build of Keycloak 26.4

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.

First public PoC None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.8high · scored by NVD · CWE-1284
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

Red Hat Red Hat build of Keycloak 26.4

    Fixed in 26.4.13-1

    Red Hat Red Hat build of Keycloak 26.4

      Fixed in 26.4-19

      Red Hat Red Hat build of Keycloak 26.4

        Fixed in 26.4-19

        Red Hat Red Hat build of Keycloak 26.6

          Fixed in 26.6.3-3

          Red Hat Red Hat build of Keycloak 26.6

            Fixed in 26.6-6

            Red Hat Red Hat build of Keycloak 26.6

              Fixed in 26.6-6

              Mitigation

              Upgrade Red Hat build of Keycloak 26.4 to 26.4.13-1 or later.

              Upgrade Red Hat build of Keycloak 26.4 to 26.4-19 or later.

              Upgrade Red Hat build of Keycloak 26.4 to 26.4-19 or later.

              Upgrade Red Hat build of Keycloak 26.6 to 26.6.3-3 or later.

              Upgrade Red Hat build of Keycloak 26.6 to 26.6-6 or later.

              Upgrade Red Hat build of Keycloak 26.6 to 26.6-6 or later.

              Workaround

              To prevent the silent dropping of oversized `subject_token` JWTs, configure Keycloak to enforce strict parameter validation. This involves setting the `fail-fast` parameter to `true` for the `TokenEndpoint` configuration, which will cause requests with oversized parameters to be rejected explicitly rather than silently processed with reduced privileges. Consult Keycloak documentation for the exact method to modify these settings. A restart of the Keycloak service may be necessary for the changes to apply.

              References

              1 more

              Timeline

              Days relative to CVE publication
              -2t=0+2+4+6+8CVE published27 May 2026 · t = 0

              No public PoC found yet; not in CISA KEV.

              PoC repositories

              Found on GitHub.

              No PoC repositories found yet.