CVE-2024-7341: Session Fixation
A session fixation issue was discovered in the SAML adapters provided by Keycloak. The session ID and JSESSIONID cookie are not changed at login time, even when the turnOffChangeSessionIdOnLogin option is configured. This flaw allows an attacker who hijacks the current session before authentication to trigger session fixation.
AI Analysis
Technical Summary
CVE-2024-7341 is a session fixation vulnerability identified in the SAML adapters of Keycloak, an open-source identity and access management solution widely used for single sign-on (SSO) and identity federation. The core issue lies in the failure to regenerate the session ID and JSESSIONID cookie upon user login, even when the 'turnOffChangeSessionIdOnLogin' option is configured to enforce this behavior. Session fixation attacks exploit this by allowing an attacker to set or hijack a valid session identifier before the victim authenticates. When the victim logs in, the attacker-controlled session remains valid, enabling the attacker to impersonate the victim with full access rights. The vulnerability affects multiple Keycloak versions, including 0, 23.0.0, and 25.0.0, indicating a persistent flaw across releases. The CVSS 3.1 base score of 7.1 reflects a high severity due to the network attack vector, low complexity, low privileges required before authentication, and the need for user interaction (the victim must log in). The impact includes full compromise of confidentiality, integrity, and availability of the victim's session and associated resources. Although no known exploits are reported in the wild, the vulnerability poses a significant risk given Keycloak's widespread use in enterprise environments for federated authentication. The flaw is particularly critical in environments where session fixation protections are expected to be enforced by configuration but are not effective due to this bug. This undermines trust in session management and can facilitate unauthorized access, data breaches, and lateral movement within networks.
Potential Impact
For European organizations, the impact of CVE-2024-7341 can be substantial, especially for those relying on Keycloak for identity federation and SSO in critical sectors such as finance, healthcare, government, and telecommunications. Successful exploitation allows attackers to hijack authenticated sessions, potentially gaining unauthorized access to sensitive data, internal applications, and services. This can lead to data breaches, regulatory non-compliance (e.g., GDPR violations), financial losses, and reputational damage. The vulnerability's ability to compromise confidentiality, integrity, and availability means attackers could manipulate or disrupt services, exfiltrate data, or impersonate users to escalate privileges. Given the high adoption of Keycloak in European enterprises and public sector organizations, the threat surface is significant. Moreover, the requirement for user interaction (victim login) means phishing or social engineering could be leveraged to facilitate exploitation. The absence of known exploits in the wild currently provides a window for mitigation, but the risk remains high due to the ease of exploitation once the attacker controls a session pre-authentication.
Mitigation Recommendations
1. Monitor Keycloak vendor advisories closely and apply patches or updates as soon as they become available to address CVE-2024-7341. 2. Until patches are released, implement compensating controls such as enforcing strict session management policies, including manual session ID regeneration upon login via custom extensions or reverse proxies. 3. Employ multi-factor authentication (MFA) to reduce the risk of session hijacking leading to full account compromise. 4. Enhance monitoring and logging of session creation, usage, and anomalies to detect potential session fixation attempts early. 5. Educate users about phishing and social engineering risks to minimize the chance of attackers obtaining pre-authentication sessions. 6. Consider network segmentation and zero-trust principles to limit the impact of compromised sessions. 7. Review and harden SAML configurations and session timeout settings to reduce session lifetime and exposure. 8. Conduct regular security assessments and penetration tests focusing on authentication flows and session management.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Belgium, Poland, Finland
CVE-2024-7341: Session Fixation
Description
A session fixation issue was discovered in the SAML adapters provided by Keycloak. The session ID and JSESSIONID cookie are not changed at login time, even when the turnOffChangeSessionIdOnLogin option is configured. This flaw allows an attacker who hijacks the current session before authentication to trigger session fixation.
AI-Powered Analysis
Technical Analysis
CVE-2024-7341 is a session fixation vulnerability identified in the SAML adapters of Keycloak, an open-source identity and access management solution widely used for single sign-on (SSO) and identity federation. The core issue lies in the failure to regenerate the session ID and JSESSIONID cookie upon user login, even when the 'turnOffChangeSessionIdOnLogin' option is configured to enforce this behavior. Session fixation attacks exploit this by allowing an attacker to set or hijack a valid session identifier before the victim authenticates. When the victim logs in, the attacker-controlled session remains valid, enabling the attacker to impersonate the victim with full access rights. The vulnerability affects multiple Keycloak versions, including 0, 23.0.0, and 25.0.0, indicating a persistent flaw across releases. The CVSS 3.1 base score of 7.1 reflects a high severity due to the network attack vector, low complexity, low privileges required before authentication, and the need for user interaction (the victim must log in). The impact includes full compromise of confidentiality, integrity, and availability of the victim's session and associated resources. Although no known exploits are reported in the wild, the vulnerability poses a significant risk given Keycloak's widespread use in enterprise environments for federated authentication. The flaw is particularly critical in environments where session fixation protections are expected to be enforced by configuration but are not effective due to this bug. This undermines trust in session management and can facilitate unauthorized access, data breaches, and lateral movement within networks.
Potential Impact
For European organizations, the impact of CVE-2024-7341 can be substantial, especially for those relying on Keycloak for identity federation and SSO in critical sectors such as finance, healthcare, government, and telecommunications. Successful exploitation allows attackers to hijack authenticated sessions, potentially gaining unauthorized access to sensitive data, internal applications, and services. This can lead to data breaches, regulatory non-compliance (e.g., GDPR violations), financial losses, and reputational damage. The vulnerability's ability to compromise confidentiality, integrity, and availability means attackers could manipulate or disrupt services, exfiltrate data, or impersonate users to escalate privileges. Given the high adoption of Keycloak in European enterprises and public sector organizations, the threat surface is significant. Moreover, the requirement for user interaction (victim login) means phishing or social engineering could be leveraged to facilitate exploitation. The absence of known exploits in the wild currently provides a window for mitigation, but the risk remains high due to the ease of exploitation once the attacker controls a session pre-authentication.
Mitigation Recommendations
1. Monitor Keycloak vendor advisories closely and apply patches or updates as soon as they become available to address CVE-2024-7341. 2. Until patches are released, implement compensating controls such as enforcing strict session management policies, including manual session ID regeneration upon login via custom extensions or reverse proxies. 3. Employ multi-factor authentication (MFA) to reduce the risk of session hijacking leading to full account compromise. 4. Enhance monitoring and logging of session creation, usage, and anomalies to detect potential session fixation attempts early. 5. Educate users about phishing and social engineering risks to minimize the chance of attackers obtaining pre-authentication sessions. 6. Consider network segmentation and zero-trust principles to limit the impact of compromised sessions. 7. Review and harden SAML configurations and session timeout settings to reduce session lifetime and exposure. 8. Conduct regular security assessments and penetration tests focusing on authentication flows and session management.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- redhat
- Date Reserved
- 2024-07-31T15:13:22.220Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 69156c928f1a6240445ae4a8
Added to database: 11/13/2025, 5:28:50 AM
Last enriched: 11/13/2025, 5:35:36 AM
Last updated: 11/13/2025, 7:55:25 AM
Views: 4
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.
Related Threats
CVE-2025-12620: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in ays-pro Poll Maker – Versus Polls, Anonymous Polls, Image Polls
MediumFirefox 145 and Chrome 142 Patch High-Severity Flaws in Latest Releases
HighCVE-2025-12891: CWE-862 Missing Authorization in ays-pro Survey Maker
MediumCVE-2025-12979: CWE-862 Missing Authorization in uscnanbu Welcart e-Commerce
MediumCVE-2025-12892: CWE-862 Missing Authorization in ays-pro Survey Maker
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.