Skip to main content

CVE-2025-2559: Allocation of Resources Without Limits or Throttling

Medium
VulnerabilityCVE-2025-2559cvecve-2025-2559
Published: Tue Mar 25 2025 (03/25/2025, 08:20:57 UTC)
Source: CVE
Vendor/Project: Red Hat
Product: Red Hat Build of Keycloak

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

AILast updated: 08/31/2025, 00:38:20 UTC

Technical Analysis

CVE-2025-2559 is a medium-severity vulnerability affecting Red Hat Build of Keycloak versions 23.0.0 through 26.1.0. The issue arises when Keycloak is configured to use JWT (JSON Web Tokens) for authentication. In this configuration, JWT tokens are cached until their expiration time. However, if a client uses JWT tokens with an excessively long expiration time—such as 24 or 48 hours—the cache can grow without bounds, as tokens remain stored until they expire. This unchecked growth can lead to an OutOfMemoryError in the Keycloak server, causing a denial of service (DoS) condition. The vulnerability does not impact confidentiality or integrity but affects availability by potentially preventing legitimate users from accessing authentication services. Exploitation requires network access (AV:N), low attack complexity (AC:L), and high privileges (PR:H), but no user interaction (UI:N). No known exploits are currently reported in the wild. The flaw stems from a lack of resource allocation limits or throttling on the token cache, which is a classic resource exhaustion vulnerability. Since Keycloak is widely used as an open-source identity and access management solution, this vulnerability could disrupt authentication services in environments relying on it, especially those with clients issuing long-lived JWT tokens.

Potential Impact

For European organizations, the impact of this vulnerability could be significant, particularly for enterprises, government agencies, and service providers that use Keycloak for centralized authentication and identity management. A denial of service caused by memory exhaustion could lead to downtime of critical authentication services, disrupting access to internal applications, cloud services, and customer portals. This could affect business continuity, compliance with data protection regulations (such as GDPR), and user productivity. Organizations with high volumes of users or automated systems issuing long-lived JWT tokens are at greater risk. Additionally, sectors with stringent availability requirements—such as finance, healthcare, and public administration—may face operational and reputational damage if authentication services become unavailable. Although exploitation requires high privileges, insider threats or compromised administrative accounts could trigger the issue. The absence of known exploits reduces immediate risk, but the vulnerability should be addressed proactively to prevent potential DoS attacks.

Mitigation Recommendations

To mitigate CVE-2025-2559, European organizations should implement the following specific measures: 1) Review and enforce strict JWT token expiration policies to avoid excessively long-lived tokens; ideally, tokens should have short expiration times aligned with security best practices. 2) Monitor Keycloak server memory usage and configure alerts for abnormal cache growth or memory consumption patterns. 3) Apply available patches or updates from Red Hat as soon as they are released; if no patch is currently available, consider upgrading to a fixed version once published. 4) Implement resource limits or throttling mechanisms on the token cache, if configurable, to prevent unbounded growth. 5) Restrict administrative privileges to trusted personnel and audit usage to reduce the risk of high-privilege exploitation. 6) Consider deploying Keycloak in a containerized or orchestrated environment with resource quotas to limit memory impact. 7) Use network segmentation and access controls to limit exposure of Keycloak instances to only necessary clients. 8) Regularly review authentication logs for unusual token issuance patterns that could indicate attempts to exploit this vulnerability.

Need more detailed analysis?Get Pro

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: 8/31/2025, 12:38:20 AM

Last updated: 10/2/2025, 1:27:33 AM

Views: 37

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats