CVE-2023-6787
Keycloak: session hijacking via re-authentication
- State
- Published
- Severity
- 6.5 Medium
- Published
- Apr 25, 2024
- Updated
- Nov 11, 2025
- Reserved
- Dec 13, 2023
Description
A flaw was found in Keycloak that occurs from an error in the re-authentication mechanism within org.keycloak.authentication. This flaw allows hijacking an active Keycloak session by triggering a new authentication process with the query parameter "prompt=login," prompting the user to re-enter their credentials. If the user cancels this re-authentication by selecting "Restart login," an account takeover may occur, as the new session, with a different SUB, will possess the same SID as the previous session.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.1 | 6.5 Medium | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N | redhat |
Weaknesses
- CWE-287 Improper Authentication
Affected Products
| Product | Versions |
|---|---|
keycloak |
|
Red Hat build of Keycloak 22Red Hat |
|
Red Hat build of Keycloak 22Red Hat |
|
Red Hat build of Keycloak 22Red Hat |
|
Red Hat build of Keycloak 22.0.10Red Hat | |
Red Hat Single Sign-On 7Red Hat |
References
- RHSA-2024:1867vendor-advisory
- RHSA-2024:1868vendor-advisory
- https://access.redhat.com/security/cve/CVE-2023-6787vdb-entry
- RHBZ#2254375issue-tracking
- https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.