Red Hat Build of Keycloak: Session Fixation
CVE-2024-7341 is a high-severity session fixation vulnerability in Red Hat Build of Keycloak from Red Hat, with a CVSS 3.1 base score of 7.1 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, but only if a user takes part, for example by opening a link or file. There is no confirmed exploitation so far. EPSS estimates a 0.85% chance of exploitation within 30 days, higher than 59% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Single Sign-on to 7.6.10 or a later version.
- Update Build Of Keycloak to 22.0.12 or 24.0.7, whichever matches your release line, or a later version.
- Read the advisory on access.redhat.com for workarounds and exact fixed builds.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Red Hat | Red Hat Build of Keycloak | Not specified in the record | Not stated |
| Red Hat | Red Hat build of Keycloak 22 | Not specified in the record | Not stated |
| Red Hat | Red Hat build of Keycloak 24 | Not specified in the record | Not stated |
| Red Hat | Red Hat Single Sign-On 7 | Not specified in the record | Not stated |
| Red Hat | Red Hat Single Sign-On 7.6 for RHEL 7 | Not specified in the record | Not stated |
| Red Hat | Red Hat Single Sign-On 7.6 for RHEL 8 | Not specified in the record | Not stated |
| Red Hat | Red Hat Single Sign-On 7.6 for RHEL 9 | Not specified in the record | Not stated |
| Red Hat | RHEL-8 based Middleware Containers | Not specified in the record | Not stated |
| Red Hat | Red Hat JBoss Enterprise Application Platform 8 | Not specified in the record | Not stated |
| Red Hat | Keycloak | 25.0.2 and earlier | Not stated |
| Red Hat | Single Sign-on | 7.6 up to, but not including, 7.6.10 | 7.6.10 |
| Red Hat | Build Of Keycloak | 22.0 up to, but not including, 22.0.12; 24.0 up to, but not including, 24.0.7 | 22.0.12, 24.0.7 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- LowA basic user account is enough.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.1 | High | CNA (redhat.com) |
| CVSS 3.1 | 7.1 | High | NVD |
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Session Fixation
Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions.
How developers prevent this class of flaw
- Invalidate any existing session identifiers prior to authorizing a new user session.
- For platforms such as ASP that do not generate new values for sessionid cookies, utilize a secondary cookie. In this approach, set a secondary cookie on the user's browser to a random value and set a session variable to the same value. If the session variable and the cookie value ever don't match, invalidate the session, and force the user to log on again.
- Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Other references
- access.redhat.com/errata/RHSA-2024:6493Mailing List
- access.redhat.com/errata/RHSA-2024:6494Mailing List
- access.redhat.com/errata/RHSA-2024:6495Mailing List
- access.redhat.com/errata/RHSA-2024:6497Mailing List
- access.redhat.com/errata/RHSA-2024:6499Mailing List
- access.redhat.com/errata/RHSA-2024:6500Mailing List
- access.redhat.com/errata/RHSA-2024:6501Mailing List
- access.redhat.com/errata/RHSA-2024:6502Mailing List
- access.redhat.com/errata/RHSA-2024:6503Mailing List
Other vulnerabilities in Red Hat Build of Keycloak
- 9.1 Critical severity
- 7.7 High severity
- 7.5 High severity
- 7.5 High severity
- 7.4 High severity
- 7.4 High severity
Recent Session Fixation vulnerabilities
- 9.8 Critical severity
- 8.8 High severity
- 7.3 High severity
- 8.8 High severity
- 7.5 High severity
- 7.8 High severity
Spotted an error? Tell us.