CVE-2024-7341
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedA 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · moderate confidenceSession fixation vulnerability in Keycloak's SAML adapters where session IDs and JSESSIONID cookies are not rotated upon SAML login, even when the turnOffChangeSessionIdOnLogin option is explicitly configured. An attacker can pre-establish a known session ID before user authentication and subsequently hijack the authenticated session.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data<= 25.0.2>= 7.6, < 7.6.10all versions>= 22.0, < 22.0.12>= 24.0, < 24.0.7CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- High
- Privileges
- Low
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify SAML adapter deploymentLocate SAML adapter configuration files in your Keycloak deployment. Check for keycloak-saml.xml, adapter config, or SAML-related subsystem configurations in standalone.xml/standalone-ha.xml. Search for elements like <saml> or SAML-specific adapter JARs in the deployment.Affected if SAML adapter is deployed and configured for authentication
-
Check Keycloak product versionRun 'keycloak --version' or check the server version via admin console at /realms/master/. Also check RPM package version via 'rpm -qa | grep keycloak' on RH systems. Compare against affected versions: Keycloak <= 25.0.2, RH SSO >= 7.6 to < 7.6.10, RHBOK >= 22.0 to < 22.0.12 or >= 24.0 to < 24.0.7Affected if Installed version falls within the affected ranges listed
-
Inspect turnOffChangeSessionIdOnLogin settingSearch SAML adapter configuration files for the parameter 'turnOffChangeSessionIdOnLogin'. This parameter is found in keycloak-saml.xml or equivalent adapter config under the <SP> element.Affected if turnOffChangeSessionIdOnLogin is explicitly set to true, or is not set (default behavior does not rotate session ID in affected versions)
-
Verify JSESSIONID cookie behaviorClear browser cookies, capture the initial JSESSIONID value before SAML login, perform SAML authentication, then check if a new JSESSIONID cookie value is issued after successful login. Compare the cookie value before and after authentication.Affected if The JSESSIONID value remains identical before and after SAML authentication (session is not rotated)
-
Review SAML assertion for session indexExamine the SAML response from the Identity Provider after login. Check if a new session index is being generated and if the adapter is binding a new server-side session to the authenticated principal.Affected if Session index in SAML response is not being used to establish a new session, or server session ID is not regenerated
You are affected if you use a SAML adapter with an affected Keycloak/RH SSO/RHBOK version AND observe that the JSESSIONID cookie value is not rotated after SAML authentication completes.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped7.6.1022.0.1224.0.7
Apply Keycloak security updates/patches that address session ID regeneration in SAML adapters; ensure turnOffChangeSessionIdOnLogin is not used in production SAML deployments.
Keycloak 25.0.3+ | RH-SSO 7.6.10+ | Build of Keycloak 22.0.12+ / 24.0.7+
- 1. Identify the exact Keycloak variant in use (Keycloak, Red Hat Single Sign-On, or Build of Keycloak)
- 2. For Keycloak: Upgrade to version 25.0.3 or later
- 3. For Red Hat Single Sign-On: Upgrade to version 7.6.10 or later
- 4. For Build Of Keycloak (22.x line): Upgrade to version 22.0.12 or later
- 5. For Build Of Keycloak (24.x line): Upgrade to version 24.0.7 or later
- 6. After upgrade, verify the session fixation protection is working by checking that JSESSIONID changes upon SAML login
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation12.0 h
- Testing8.0 h
- Review / QA4.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $7,808.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2024-7341 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2024-7341 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data