CVE-2024-4540: Cleartext Storage of Sensitive Information
A flaw was found in Keycloak in OAuth 2.0 Pushed Authorization Requests (PAR). Client-provided parameters were found to be included in plain text in the KC_RESTART cookie returned by the authorization server's HTTP response to a `request_uri` authorization request, possibly leading to an information disclosure vulnerability.
AI Analysis
Technical Summary
CVE-2024-4540 identifies a vulnerability in Keycloak's handling of OAuth 2.0 Pushed Authorization Requests (PAR). Specifically, when a client sends a request_uri authorization request, certain client-supplied parameters are embedded in plaintext within the KC_RESTART cookie returned by the authorization server's HTTP response. This cookie is used internally by Keycloak to manage authorization request state, but including sensitive parameters in cleartext exposes them to interception or unauthorized access, potentially leaking confidential information such as client identifiers, scopes, or other sensitive OAuth parameters. The vulnerability does not require any authentication or user interaction, and can be exploited remotely over the network. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) reflects that the attack can be performed remotely with low complexity, no privileges, and no user interaction, resulting in a high confidentiality impact but no integrity or availability impact. Although no public exploits are known yet, the flaw poses a significant risk to confidentiality in OAuth 2.0 authorization flows using Keycloak. Keycloak is widely used as an open-source identity and access management solution, especially in enterprise and cloud environments, making this vulnerability relevant to many organizations. The flaw stems from improper handling of sensitive data in cookies, a common web security concern, and highlights the need for secure storage and transmission of OAuth parameters.
Potential Impact
The primary impact of CVE-2024-4540 is the potential disclosure of sensitive OAuth 2.0 authorization parameters to unauthorized parties. This can lead to exposure of client identifiers, scopes, or other confidential data that could be leveraged for further attacks such as session hijacking, unauthorized access, or phishing. Since the vulnerability does not affect integrity or availability, it does not directly allow modification or disruption of services. However, the confidentiality breach can undermine trust in the authorization process and compromise user privacy. Organizations relying on Keycloak for identity and access management, especially those handling sensitive or regulated data, face increased risk of data leakage and compliance violations. The ease of exploitation over the network without authentication increases the threat surface, particularly in multi-tenant or cloud environments where attackers may have network access. The absence of known exploits in the wild suggests limited immediate exploitation but also underscores the importance of proactive mitigation before attackers develop weaponized exploits. Overall, the vulnerability can weaken the security posture of OAuth 2.0 implementations and expose organizations to data breaches and reputational damage.
Mitigation Recommendations
To mitigate CVE-2024-4540, organizations should first apply any official patches or updates released by Keycloak addressing this vulnerability as soon as they become available. Until patches are deployed, administrators should consider disabling or avoiding the use of OAuth 2.0 Pushed Authorization Requests (PAR) with request_uri parameters to prevent triggering the vulnerable code path. Review and harden cookie security settings by ensuring the KC_RESTART cookie is marked with Secure and HttpOnly flags to reduce interception risk. Implement strict transport layer security (TLS) to protect cookies and authorization requests in transit. Monitor logs and network traffic for unusual or unauthorized access patterns related to authorization requests and cookies. Conduct security assessments and penetration testing focused on OAuth flows to detect potential information leakage. Educate developers and administrators about secure handling of OAuth parameters and the risks of storing sensitive data in client-accessible cookies. Consider deploying web application firewalls (WAFs) with custom rules to detect and block suspicious authorization request patterns. Finally, maintain an up-to-date inventory of Keycloak deployments and OAuth configurations to ensure rapid response to emerging threats.
Affected Countries
United States, Germany, United Kingdom, France, Canada, Australia, Netherlands, India, Japan, South Korea
CVE-2024-4540: Cleartext Storage of Sensitive Information
Description
A flaw was found in Keycloak in OAuth 2.0 Pushed Authorization Requests (PAR). Client-provided parameters were found to be included in plain text in the KC_RESTART cookie returned by the authorization server's HTTP response to a `request_uri` authorization request, possibly leading to an information disclosure vulnerability.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2024-4540 identifies a vulnerability in Keycloak's handling of OAuth 2.0 Pushed Authorization Requests (PAR). Specifically, when a client sends a request_uri authorization request, certain client-supplied parameters are embedded in plaintext within the KC_RESTART cookie returned by the authorization server's HTTP response. This cookie is used internally by Keycloak to manage authorization request state, but including sensitive parameters in cleartext exposes them to interception or unauthorized access, potentially leaking confidential information such as client identifiers, scopes, or other sensitive OAuth parameters. The vulnerability does not require any authentication or user interaction, and can be exploited remotely over the network. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) reflects that the attack can be performed remotely with low complexity, no privileges, and no user interaction, resulting in a high confidentiality impact but no integrity or availability impact. Although no public exploits are known yet, the flaw poses a significant risk to confidentiality in OAuth 2.0 authorization flows using Keycloak. Keycloak is widely used as an open-source identity and access management solution, especially in enterprise and cloud environments, making this vulnerability relevant to many organizations. The flaw stems from improper handling of sensitive data in cookies, a common web security concern, and highlights the need for secure storage and transmission of OAuth parameters.
Potential Impact
The primary impact of CVE-2024-4540 is the potential disclosure of sensitive OAuth 2.0 authorization parameters to unauthorized parties. This can lead to exposure of client identifiers, scopes, or other confidential data that could be leveraged for further attacks such as session hijacking, unauthorized access, or phishing. Since the vulnerability does not affect integrity or availability, it does not directly allow modification or disruption of services. However, the confidentiality breach can undermine trust in the authorization process and compromise user privacy. Organizations relying on Keycloak for identity and access management, especially those handling sensitive or regulated data, face increased risk of data leakage and compliance violations. The ease of exploitation over the network without authentication increases the threat surface, particularly in multi-tenant or cloud environments where attackers may have network access. The absence of known exploits in the wild suggests limited immediate exploitation but also underscores the importance of proactive mitigation before attackers develop weaponized exploits. Overall, the vulnerability can weaken the security posture of OAuth 2.0 implementations and expose organizations to data breaches and reputational damage.
Mitigation Recommendations
To mitigate CVE-2024-4540, organizations should first apply any official patches or updates released by Keycloak addressing this vulnerability as soon as they become available. Until patches are deployed, administrators should consider disabling or avoiding the use of OAuth 2.0 Pushed Authorization Requests (PAR) with request_uri parameters to prevent triggering the vulnerable code path. Review and harden cookie security settings by ensuring the KC_RESTART cookie is marked with Secure and HttpOnly flags to reduce interception risk. Implement strict transport layer security (TLS) to protect cookies and authorization requests in transit. Monitor logs and network traffic for unusual or unauthorized access patterns related to authorization requests and cookies. Conduct security assessments and penetration testing focused on OAuth flows to detect potential information leakage. Educate developers and administrators about secure handling of OAuth parameters and the risks of storing sensitive data in client-accessible cookies. Consider deploying web application firewalls (WAFs) with custom rules to detect and block suspicious authorization request patterns. Finally, maintain an up-to-date inventory of Keycloak deployments and OAuth configurations to ensure rapid response to emerging threats.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- redhat
- Date Reserved
- 2024-05-06T11:02:39.841Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6920235bcf2d47c38997b87e
Added to database: 11/21/2025, 8:31:23 AM
Last enriched: 2/26/2026, 3:20:36 PM
Last updated: 3/25/2026, 4:32:16 AM
Views: 176
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.