Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-4540: Cleartext Storage of Sensitive Information

0
High
VulnerabilityCVE-2024-4540cvecve-2024-4540
Published: Mon Jun 03 2024 (06/03/2024, 15:33:18 UTC)
Source: CVE Database V5

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

AILast updated: 02/26/2026, 15:20:36 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

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

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses