GHSA-rg35-5v25-mqvp CVE-2025-12390
Keycloak vulnerable to session takeovers due to reuse of session identifiers
- Severity
- 6.0 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.14%
- Chance of exploitation in the next 30 days. Higher than 3.41% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-384 Session Fixation
- Fix
26.0.0- Upgrade org.keycloak:keycloak-services to this version or later
Description
A flaw was found in Keycloak. In Keycloak where a user can accidentally get access to another user's session if both use the same device and browser. This happens because Keycloak sometimes reuses session identifiers and doesn’t clean up properly during logout when browser cookies are missing. As a result, one user may receive tokens that belong to another user.
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.keycloak:keycloak-services | < 26.0.0 |
26.0.0 |
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 → 26.0.0
- maven
<dependency><groupId>org.keycloak</groupId><artifactId>keycloak-services</artifactId><version>26.0.0</version></dependency>- gradle
implementation("org.keycloak:keycloak-services:26.0.0")
Severity breakdown
CVSS 3.1 6.0
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N
- Attack vector
- Local
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
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/issues/32197
- github.com/keycloak/keycloak/issues/43853
- github.com/keycloak/keycloak/commit/5344aada5ee06b02ec3a9e0f52fa381d085b6282
- github.com/keycloak/keycloak/commit/b46fab230824a2304daafe74be019e8bd4ee590a
- github.com/keycloak/keycloak/commit/d82438a611f2f869f1966c13012953fe963a493d
- github.com/keycloak/keycloak/commit/ef75a4dc50aa9459777494e4b88655100bf2ac80
- access.redhat.com/errata/RHSA-2025:21370
- access.redhat.com/errata/RHSA-2025:21371
- access.redhat.com/errata/RHSA-2025:22088
- access.redhat.com/errata/RHSA-2025:22089
- access.redhat.com/security/cve/CVE-2025-12390
- bugzilla.redhat.com/show_bug.cgi
- github.com/keycloak/keycloak/discussions/31265
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