CVE-2026-4634: Keycloak: keycloak: denial of service via excessive processing of openid connect scope parameters

Published Mar 23, 2026
·
Updated

A flaw was found in Keycloak. An unauthenticated attacker can exploit this vulnerability by sending a specially crafted POST request with an excessively long scope parameter to the OpenID Connect (OIDC) token endpoint. This leads to high resource consumption and prolonged processing times, ultimately resulting in a Denial of Service (DoS) for the Keycloak server.

Other sources

When receiving a POST request on the OpenID Connect token endpoint, Keycloak fails to limit the passed-in scopes, which leads to a high resource usage in Keycloak.

1. Generate a long list of scopes

SCOPE5K=$(python3 -c "print(' '.join(['scope'+str for i in range(5000)]))") echo "Scope parameter length: ${#SCOPE5K} bytes"

2. Post a ROPC Grant:

time curl -s -o /dev/null -w "admin-cli 5K scopes: HTTP %{httpcode} (%{timetotal}s)\n" \ -X POST "${KCURL}/realms/master/protocol/openid-connect/token" \ -d "granttype=password&clientid=admin-cli&username=x&password=x&scope=${SCOPE5K}"

Root cause: TokenManager.getRequestedClientScopes() at line 658 performs String.contains() on the entire scope parameter string for each default client scope, resulting in O(n²) processing time.

A single POST request with ~49KB of scope values causes 38.6 seconds of server-side processing; with ~99KB it reaches 151.8 seconds

The same problem occurs for client credential grants and token refreshes - in the case of token refreshes the problem occurs even before checking the token, so any token can be used, allowing any unauthenticated attacker to perform this.

Red Hat

Affected Software

6 affected components
Keycloak Keycloak
redhat Build Of Keycloak
redhat Build Of Keycloak=26.2
redhat Build Of Keycloak=26.2.15
redhat Build Of Keycloak=26.4
redhat Build Of Keycloak=26.4.11

Event History

Mar 23, 2026
Data Sourced
via Red Hat·08:41 AM
DescriptionSeverityAffected Software
Apr 2, 2026
CVE Published
via MITRE·12:44 PM
Data Sourced
via MITRE·12:44 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-4634?

CVE-2026-4634 has been classified with a severity of medium due to its potential for denial of service.

2

How do I fix CVE-2026-4634?

To mitigate CVE-2026-4634, update your Keycloak installation to the latest version provided by Red Hat.

3

Which versions of Keycloak are affected by CVE-2026-4634?

CVE-2026-4634 affects multiple versions of Keycloak including 26.2, 26.2.15, 26.4, and 26.4.11.

4

Can CVE-2026-4634 be exploited by authenticated users?

No, CVE-2026-4634 can be exploited by unauthenticated attackers through specially crafted requests.

5

What kind of attack does CVE-2026-4634 facilitate?

CVE-2026-4634 enables a denial of service attack by causing excessive processing of OpenID Connect scope parameters.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203