CVE-2025-2559: Allocation of Resources Without Limits or Throttling
A flaw was found in Keycloak. When the configuration uses JWT tokens for authentication, the tokens are cached until expiration. If a client uses JWT tokens with an excessively long expiration time, for example, 24 or 48 hours, the cache can grow indefinitely, leading to an OutOfMemoryError. This issue could result in a denial of service condition, preventing legitimate users from accessing the system.
AI Analysis
Technical Summary
CVE-2025-2559 is a resource allocation vulnerability found in the Red Hat Build of Keycloak, an open-source identity and access management solution. The flaw occurs when Keycloak is configured to use JWT tokens for authentication, which are cached until their expiration time. If a client issues JWT tokens with excessively long expiration periods—such as 24 or 48 hours—the token cache can grow indefinitely because tokens remain stored until they expire. This unchecked growth consumes increasing amounts of memory, eventually leading to an OutOfMemoryError in the Keycloak server. The resulting failure causes a denial of service, preventing legitimate users from authenticating and accessing protected resources. The vulnerability requires the attacker to have authenticated access to generate or use long-lived tokens but does not require user interaction beyond that. The CVSS v3.1 score is 4.9 (medium severity), reflecting the vulnerability's impact on availability without compromising confidentiality or integrity. No public exploits have been reported yet, but the flaw highlights the importance of proper token lifecycle management and resource throttling in authentication systems. The affected versions include Keycloak releases from 23.0.0 through 26.1.0, and the issue was published on March 25, 2025. Since Keycloak is widely used in enterprise and cloud environments for identity federation and single sign-on, this vulnerability poses a risk to service continuity if exploited.
Potential Impact
The primary impact of CVE-2025-2559 is a denial of service condition caused by an OutOfMemoryError in Keycloak servers. This can disrupt authentication services, preventing users from logging into applications and systems that rely on Keycloak for identity management. Organizations using affected versions may experience service outages or degraded performance, impacting business operations and user productivity. Since Keycloak often serves as a central authentication hub, the disruption can cascade to multiple dependent services and applications. Although the vulnerability does not expose sensitive data or allow unauthorized access, the loss of availability can be critical, especially in environments requiring high uptime and secure access controls. The requirement for authenticated access to exploit the flaw somewhat limits the attack surface but does not eliminate risk, as insider threats or compromised accounts could trigger the condition. The absence of known exploits in the wild suggests limited current exploitation but does not preclude future attacks. Overall, the vulnerability threatens operational continuity and could be leveraged in targeted denial of service campaigns against organizations using Keycloak.
Mitigation Recommendations
To mitigate CVE-2025-2559, organizations should implement the following specific measures: 1) Review and enforce strict JWT token expiration policies, avoiding excessively long-lived tokens; 2) Configure Keycloak to limit the size of the token cache or implement cache eviction policies to prevent unbounded growth; 3) Monitor Keycloak server memory usage and set alerts for abnormal increases that could indicate exploitation attempts; 4) Apply any available patches or updates from Red Hat or the Keycloak community addressing this vulnerability as soon as they are released; 5) Restrict the ability to generate long-lived tokens to trusted clients and enforce least privilege principles; 6) Consider deploying rate limiting or throttling mechanisms on authentication requests to reduce the risk of cache exhaustion; 7) Conduct regular audits of token issuance and usage patterns to detect anomalies; 8) In environments where patching is delayed, implement resource limits at the container or OS level to prevent total system failure; 9) Educate administrators about the risks of long token expiration and the importance of token lifecycle management. These targeted actions go beyond generic advice by focusing on cache management, token policy, and monitoring specific to this vulnerability.
Affected Countries
United States, Germany, United Kingdom, France, Japan, India, Canada, Australia, Netherlands, Brazil
CVE-2025-2559: Allocation of Resources Without Limits or Throttling
Description
A flaw was found in Keycloak. When the configuration uses JWT tokens for authentication, the tokens are cached until expiration. If a client uses JWT tokens with an excessively long expiration time, for example, 24 or 48 hours, the cache can grow indefinitely, leading to an OutOfMemoryError. This issue could result in a denial of service condition, preventing legitimate users from accessing the system.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2025-2559 is a resource allocation vulnerability found in the Red Hat Build of Keycloak, an open-source identity and access management solution. The flaw occurs when Keycloak is configured to use JWT tokens for authentication, which are cached until their expiration time. If a client issues JWT tokens with excessively long expiration periods—such as 24 or 48 hours—the token cache can grow indefinitely because tokens remain stored until they expire. This unchecked growth consumes increasing amounts of memory, eventually leading to an OutOfMemoryError in the Keycloak server. The resulting failure causes a denial of service, preventing legitimate users from authenticating and accessing protected resources. The vulnerability requires the attacker to have authenticated access to generate or use long-lived tokens but does not require user interaction beyond that. The CVSS v3.1 score is 4.9 (medium severity), reflecting the vulnerability's impact on availability without compromising confidentiality or integrity. No public exploits have been reported yet, but the flaw highlights the importance of proper token lifecycle management and resource throttling in authentication systems. The affected versions include Keycloak releases from 23.0.0 through 26.1.0, and the issue was published on March 25, 2025. Since Keycloak is widely used in enterprise and cloud environments for identity federation and single sign-on, this vulnerability poses a risk to service continuity if exploited.
Potential Impact
The primary impact of CVE-2025-2559 is a denial of service condition caused by an OutOfMemoryError in Keycloak servers. This can disrupt authentication services, preventing users from logging into applications and systems that rely on Keycloak for identity management. Organizations using affected versions may experience service outages or degraded performance, impacting business operations and user productivity. Since Keycloak often serves as a central authentication hub, the disruption can cascade to multiple dependent services and applications. Although the vulnerability does not expose sensitive data or allow unauthorized access, the loss of availability can be critical, especially in environments requiring high uptime and secure access controls. The requirement for authenticated access to exploit the flaw somewhat limits the attack surface but does not eliminate risk, as insider threats or compromised accounts could trigger the condition. The absence of known exploits in the wild suggests limited current exploitation but does not preclude future attacks. Overall, the vulnerability threatens operational continuity and could be leveraged in targeted denial of service campaigns against organizations using Keycloak.
Mitigation Recommendations
To mitigate CVE-2025-2559, organizations should implement the following specific measures: 1) Review and enforce strict JWT token expiration policies, avoiding excessively long-lived tokens; 2) Configure Keycloak to limit the size of the token cache or implement cache eviction policies to prevent unbounded growth; 3) Monitor Keycloak server memory usage and set alerts for abnormal increases that could indicate exploitation attempts; 4) Apply any available patches or updates from Red Hat or the Keycloak community addressing this vulnerability as soon as they are released; 5) Restrict the ability to generate long-lived tokens to trusted clients and enforce least privilege principles; 6) Consider deploying rate limiting or throttling mechanisms on authentication requests to reduce the risk of cache exhaustion; 7) Conduct regular audits of token issuance and usage patterns to detect anomalies; 8) In environments where patching is delayed, implement resource limits at the container or OS level to prevent total system failure; 9) Educate administrators about the risks of long token expiration and the importance of token lifecycle management. These targeted actions go beyond generic advice by focusing on cache management, token policy, and monitoring specific to this vulnerability.
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- redhat
- Date Reserved
- 2025-03-20T12:22:59.504Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d983bc4522896dcbee413
Added to database: 5/21/2025, 9:09:15 AM
Last enriched: 2/27/2026, 12:58:04 PM
Last updated: 3/23/2026, 8:45:25 PM
Views: 90
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.