CVE-2026-4634
Received Received - Intake
Denial of Service via Excessive Scope Parameter in Keycloak OIDC

Publication date: 2026-04-02

Last updated on: 2026-04-16

Assigner: Red Hat, Inc.

Description
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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-02
Last Modified
2026-04-16
Generated
2026-05-07
AI Q&A
2026-04-02
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 5 associated CPEs
Vendor Product Version / Range
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
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1050 The product has a loop body or loop condition that contains a control element that directly or indirectly consumes platform resources, e.g. messaging, sessions, locks, or file descriptors.
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The provided information does not specify any direct impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.


Can you explain this vulnerability to me?

CVE-2026-4634 is a denial of service (DoS) vulnerability in Keycloak related to the processing of OpenID Connect (OIDC) scope parameters.

An unauthenticated attacker can send a specially crafted POST request with an excessively long scope parameter to the OIDC token endpoint. Keycloak does not limit the size or number of scopes, leading to very high resource consumption.

The root cause is inefficient processing in the method TokenManager.getRequestedClientScopes(), which uses a String.contains() check that results in O(nΒ²) time complexity relative to the scope string length. This causes exponential delays as the scope list grows.

Proof of concept tests show that a single POST request with about 49 KB of scope data causes roughly 38.6 seconds of server processing, and 99 KB causes about 151.8 seconds, effectively causing a denial of service.

Multiple grant types are affected, including Resource Owner Password Credentials, client credentials, and token refreshes. The token refresh endpoint is vulnerable even before token validation, allowing unauthenticated exploitation.


How can this vulnerability impact me? :

This vulnerability can cause a denial of service (DoS) on the Keycloak server by exhausting server resources and causing prolonged processing times.

An attacker can exploit this flaw without authentication by sending a crafted POST request with a very large scope parameter, leading to server slowdown or unavailability.

As a result, legitimate users may be unable to authenticate or obtain tokens, disrupting access to applications and services that rely on Keycloak for identity and access management.

This can impact business continuity and availability of critical systems that depend on Keycloak for authentication.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by monitoring for unusually large or excessively long POST requests sent to the OpenID Connect token endpoint of the Keycloak server, specifically those containing very large scope parameters.

One approach is to capture and analyze HTTP POST requests to the token endpoint and check the size of the scope parameter. Requests with scope data sizes in the tens of kilobytes (e.g., 49 KB or more) are suspicious and may indicate an exploit attempt.

Network or system administrators can use tools like curl or wget to simulate such requests for testing detection, or use packet capture tools like tcpdump or Wireshark to monitor traffic.

  • Use tcpdump to capture POST requests to the token endpoint: tcpdump -A -s 0 'tcp port 8080 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
  • Use grep or similar tools to filter logs for POST requests with large scope parameters.
  • Use curl to test the endpoint with a large scope parameter: curl -X POST -d 'scope=<very_long_scope_string>' https://<keycloak-server>/auth/realms/<realm>/protocol/openid-connect/token

What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include limiting the size and number of scope parameters accepted by the Keycloak server at the OpenID Connect token endpoint.

Administrators should apply any available patches or updates from Keycloak or their Linux distribution that address this vulnerability as soon as possible.

If patches are not yet available, consider implementing network-level protections such as rate limiting or filtering to block or throttle excessively large POST requests targeting the token endpoint.

Monitoring and alerting on abnormal resource consumption or prolonged processing times on the Keycloak server can also help detect and respond to exploitation attempts.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart