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

Read the record on cve.org

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

CVSSScoreVectorSource
3.16.5 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:Nredhat

Weaknesses

Affected Products

ProductVersions
keycloak
  • before 22.0.10Affected
  • before 24.0.3Affected
Red Hat build of Keycloak 22Red Hat
  • 22.0.10-1 and laterNot affected
Red Hat build of Keycloak 22Red Hat
  • 22-13 and laterNot affected
Red Hat build of Keycloak 22Red Hat
  • 22-16 and laterNot affected
Red Hat build of Keycloak 22.0.10Red Hat
    Red Hat Single Sign-On 7Red Hat

      References

      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.