GHSA-5rxp-2rhr-qwqv BIT-keycloak-2024-7341 CVE-2024-7341 GHSA-j76j-rqwj-jmvv
Keycloak has session fixation in Elytron SAML adapters
- Severity
- 0.0 / 10
- High · CVSS 4.0
- Exploit chance (EPSS)
- 0.85%
- Chance of exploitation in the next 30 days. Higher than 58.12% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-384 Session Fixation
- Fix
22.0.12- Upgrade org.keycloak:keycloak-services to this version or later
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.
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.keycloak:keycloak-services | < 22.0.12 |
22.0.12 |
| org.keycloak:keycloak-services | >= 23.0.0, < 24.0.7 |
24.0.7 |
| org.keycloak:keycloak-services | >= 25.0.0, < 25.0.5 |
25.0.5 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
org.keycloak:keycloak-services Maven → 22.0.12
- maven
<dependency><groupId>org.keycloak</groupId><artifactId>keycloak-services</artifactId><version>22.0.12</version></dependency>- gradle
implementation("org.keycloak:keycloak-services:22.0.12")
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- Present
- Privileges required
- Low
- User interaction
- Passive
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- High
- Availability (vulnerable system)
- High
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
CVSS 3.1 7.1
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-384: 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 to prevent it
- Architecture and Design: Invalidate any existing session identifiers prior to authorizing a new user session.
- Architecture and Design: 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.
- Operation: 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 [REF-1481].
References
Advisories
Packages
Other links
- github.com/keycloak/keycloak/security/advisories/GHSA-5rxp-2rhr-qwqv
- github.com/keycloak/keycloak/commit/5e06da2f6794c695051605e26a01affa3a18f66b
- github.com/keycloak/keycloak/commit/5b3de0c7e7f367103affe2f5167913a2ce021cf1
- github.com/keycloak/keycloak/commit/2341d6ee7a3567c58fd6a04a419fe4403e13374c
- bugzilla.redhat.com/show_bug.cgi
- access.redhat.com/security/cve/CVE-2024-7341
- access.redhat.com/errata/RHSA-2024:6503
- access.redhat.com/errata/RHSA-2024:6502
- access.redhat.com/errata/RHSA-2024:6501
- access.redhat.com/errata/RHSA-2024:6500
- access.redhat.com/errata/RHSA-2024:6499
- access.redhat.com/errata/RHSA-2024:6497
- access.redhat.com/errata/RHSA-2024:6495
- access.redhat.com/errata/RHSA-2024:6494
- access.redhat.com/errata/RHSA-2024:6493
- github.com/advisories/GHSA-j76j-rqwj-jmvv
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-v3f7-2p4r-mwfw Keycloak vulnerable to cross-site scripting (xss) via case-insensitive uri validation bypass | High | Also affects org.keycloak:keycloak-services |
| GHSA-9jrw-8xf7-xqhq Keycloak vulnerable to information disclosure through arbitrary filesystem path probing | Medium | Also affects org.keycloak:keycloak-services |
| GHSA-w3p3-7cjg-vgfw Keycloak allows unauthorized access to resources via uma permission ticket bypass | Medium | Also affects org.keycloak:keycloak-services |
| GHSA-f5p5-6xmx-p252 Keycloak vulnerable to authorization bypass via incorrect uri comparison | High | Also affects org.keycloak:keycloak-services |
| GHSA-r7rc-c989-86g6 Keycloak: Attacker can re-enable and take over disabled clients via registration access token | Medium | Also affects org.keycloak:keycloak-services |
| GHSA-4gv3-mc9p-5wqc Keycloak: Unauthenticated account takeover via reset-credentials flow bypass | Critical | Also affects org.keycloak:keycloak-services |
| GHSA-6g26-7cx5-mrrg Keycloak: Information disclosure due to user profile permission bypass | Low | Also affects org.keycloak:keycloak-services |
| GHSA-cpf7-j4cf-vqx4 Keycloak has an Out-of-bounds Read | Medium | Also affects org.keycloak:keycloak-services |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor