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 is a vulnerability identified in Keycloak's implementation of OAuth 2.0 Pushed Authorization Requests (PAR). The flaw arises because client-supplied parameters are embedded in plaintext within the KC_RESTART cookie, which the authorization server returns in HTTP responses to request_uri authorization requests. This cookie is intended to maintain state during the authorization process, but including sensitive parameters in cleartext exposes them to potential interception or unauthorized access. Since the KC_RESTART cookie is transmitted over the network and potentially accessible to client-side scripts or intermediaries, attackers with network access or the ability to read cookies could extract sensitive OAuth parameters, leading to information disclosure. The vulnerability does not require any privileges or user interaction to exploit, and it affects confidentiality but not integrity or availability. 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 and no privileges, resulting in a high impact on confidentiality. No patches or exploits are currently documented, but the issue is significant given Keycloak's role in securing authentication and authorization flows in many enterprise environments.
Potential Impact
The primary impact of CVE-2024-4540 is the unauthorized disclosure of sensitive OAuth 2.0 parameters, which may include client identifiers, scopes, or other authorization details. Such information leakage can facilitate further attacks such as session hijacking, replay attacks, or targeted phishing by revealing internal authorization details. Organizations relying on Keycloak for identity and access management may face increased risk of data breaches or unauthorized access if attackers intercept these cookies. The vulnerability undermines the confidentiality of the OAuth authorization process, potentially exposing sensitive client data to network attackers or malicious insiders with access to client devices or network traffic. While the vulnerability does not directly affect system integrity or availability, the loss of confidentiality can have cascading effects on trust and security posture. This is particularly critical for organizations handling sensitive user data, financial information, or operating in regulated industries.
Mitigation Recommendations
To mitigate CVE-2024-4540, organizations should first apply any available patches or updates from Keycloak that address the issue. If patches are not yet available, administrators should consider disabling or restricting the use of OAuth 2.0 Pushed Authorization Requests (PAR) or the request_uri authorization request flow until a fix is deployed. Implementing strict cookie security attributes such as Secure, HttpOnly, and SameSite can reduce the risk of cookie interception or cross-site attacks. Network-level protections like TLS enforcement and monitoring for unusual cookie transmissions can help detect exploitation attempts. Additionally, reviewing and minimizing the sensitive data included in client parameters and cookies can reduce exposure. Organizations should also audit their Keycloak configurations and logs for suspicious activity related to authorization requests. Finally, educating developers and security teams about secure OAuth implementations and the risks of cleartext storage of sensitive data is essential to prevent similar issues.
Affected Countries
United States, Germany, United Kingdom, France, Canada, Australia, Japan, India
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 is a vulnerability identified in Keycloak's implementation of OAuth 2.0 Pushed Authorization Requests (PAR). The flaw arises because client-supplied parameters are embedded in plaintext within the KC_RESTART cookie, which the authorization server returns in HTTP responses to request_uri authorization requests. This cookie is intended to maintain state during the authorization process, but including sensitive parameters in cleartext exposes them to potential interception or unauthorized access. Since the KC_RESTART cookie is transmitted over the network and potentially accessible to client-side scripts or intermediaries, attackers with network access or the ability to read cookies could extract sensitive OAuth parameters, leading to information disclosure. The vulnerability does not require any privileges or user interaction to exploit, and it affects confidentiality but not integrity or availability. 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 and no privileges, resulting in a high impact on confidentiality. No patches or exploits are currently documented, but the issue is significant given Keycloak's role in securing authentication and authorization flows in many enterprise environments.
Potential Impact
The primary impact of CVE-2024-4540 is the unauthorized disclosure of sensitive OAuth 2.0 parameters, which may include client identifiers, scopes, or other authorization details. Such information leakage can facilitate further attacks such as session hijacking, replay attacks, or targeted phishing by revealing internal authorization details. Organizations relying on Keycloak for identity and access management may face increased risk of data breaches or unauthorized access if attackers intercept these cookies. The vulnerability undermines the confidentiality of the OAuth authorization process, potentially exposing sensitive client data to network attackers or malicious insiders with access to client devices or network traffic. While the vulnerability does not directly affect system integrity or availability, the loss of confidentiality can have cascading effects on trust and security posture. This is particularly critical for organizations handling sensitive user data, financial information, or operating in regulated industries.
Mitigation Recommendations
To mitigate CVE-2024-4540, organizations should first apply any available patches or updates from Keycloak that address the issue. If patches are not yet available, administrators should consider disabling or restricting the use of OAuth 2.0 Pushed Authorization Requests (PAR) or the request_uri authorization request flow until a fix is deployed. Implementing strict cookie security attributes such as Secure, HttpOnly, and SameSite can reduce the risk of cookie interception or cross-site attacks. Network-level protections like TLS enforcement and monitoring for unusual cookie transmissions can help detect exploitation attempts. Additionally, reviewing and minimizing the sensitive data included in client parameters and cookies can reduce exposure. Organizations should also audit their Keycloak configurations and logs for suspicious activity related to authorization requests. Finally, educating developers and security teams about secure OAuth implementations and the risks of cleartext storage of sensitive data is essential to prevent similar issues.
Affected Countries
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: 3/27/2026, 6:27:34 PM
Last updated: 5/10/2026, 9:04:34 AM
Views: 350
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.