CVE-2024-7341: Wildfly-elytron: org.keycloak/keycloak-services: session fixation in elytron saml adapters

Published Jul 31, 2024
·
Updated

Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-5rxp-2rhr-qwqv. This link is maintained to preserve external references.

Original 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.

Other sources

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.

GitHub

The SAML adapter is expected to change the sesion ID (and the respective JSESSIONID cookie) when the login is performed (except if the option turnOffChangeSessionIdOnLogin is true). This way the session ID is modified in the login to change the previous non-authenticated ID to a new one and avoid using the same valiue (just to protect against a possible cookie hijacking).

Requirements to exploit: You need to hijack the current session before authentication and it will be valid after it. Session fixation issue.

Component affected: org.keycloak.services

Version affected: <= 25.0.2 (also present in RHBK and RHSSO elytron variant).

Red Hat

Affected Software

13 affected componentsFixes available
maven/org.keycloak:keycloak-services>=25.0.0<25.0.5
25.0.5
maven/org.keycloak:keycloak-services>=23.0.0<=24.0.6
24.0.7
maven/org.keycloak:keycloak-services<=22.0.11
22.0.12
maven/org.keycloak:keycloak-services>=23.0.0<24.0.7
24.0.7
maven/org.keycloak:keycloak-services<22.0.12
22.0.12
redhat keycloak<=25.0.2
All of the following
redhat Single Sign-on>=7.6<7.6.10
Any of the following
redhat Enterprise Linux=7.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
redhat Build Of Keycloak>=22.0<22.0.12
redhat Build Of Keycloak>=24.0<24.0.7
redhat Single Sign-on

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.keycloak:keycloak-services to a version that resolves this vulnerability.

    Fixed in 25.0.5
  2. Upgrade

    Upgrade maven/org.keycloak:keycloak-services to a version that resolves this vulnerability.

    Fixed in 24.0.7
  3. Upgrade

    Upgrade maven/org.keycloak:keycloak-services to a version that resolves this vulnerability.

    Fixed in 22.0.12
  4. Compensating control

    Prevent session fixation by ensuring the SAML adapter changes the session ID (and the JSESSIONID cookie) at login time; do not enable the behavior that turns it off (i.e., avoid having turnOffChangeSessionIdOnLogin set to true).

Event History

Jul 31, 2024
Data Sourced
via Red Hat·03:15 PM
DescriptionSeverityAffected Software
Sep 9, 2024
CVE Published
via MITRE·06:51 PM
Data Sourced
via MITRE·06:51 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:15 PM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·09:31 PM
Dec 20, 2024
Withdrawn
via GitHub·05:50 PM
Sep 25, 56691
Event
via NVD·03:48 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-7341?

CVE-2024-7341 is classified as a moderate severity vulnerability due to its potential impact on session management.

2

How do I fix CVE-2024-7341?

To fix CVE-2024-7341, upgrade Keycloak to version 25.0.5, 24.0.7, or 22.0.12 depending on your current version.

3

Which versions of Keycloak are affected by CVE-2024-7341?

CVE-2024-7341 affects Keycloak versions 23.0.0 to 25.0.2 and 22.0.0 to 22.0.11.

4

What type of issue is described in CVE-2024-7341?

CVE-2024-7341 describes a session fixation vulnerability in the SAML adapters provided by Keycloak.

5

Is there a known exploit for CVE-2024-7341?

As of now, there are no publicly disclosed exploits for CVE-2024-7341, but it is recommended to apply the necessary patches to mitigate risks.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203