CVE-2023-6787: Keycloak vulnerable to session hijacking via re-authentication
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.61307%
CWE
Published
4/17/2024
Updated
3/14/2025
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.keycloak:keycloak-services | maven | < 22.0.10 | 22.0.10 |
org.keycloak:keycloak-services | maven | >= 23.0.0, < 24.0.3 | 24.0.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper session management during re-authentication flows. Keycloak's authorization endpoint handles 'prompt=login' requests but doesn't properly reset session identifiers when users cancel re-authentication. AuthenticationManager
's cookie handling retains the same SID across sessions when re-auth is interrupted, violating session isolation. These functions
directly manage session creation/authentication state and align with the described SID reuse behavior. The CWEs (287/384/613) all point to authentication/session management flaws in these core authentication flow components.