CVE-2023-6787

published 25 Apr 2024 · updated 11 Nov 2025

Keycloak: session hijacking via re-authentication

6.5MediumCVSS 6.5EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in 22.0.10 and 24.0.3.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Red HatBuild of Keycloak
Red HatSingle Sign-On
<22.0.10, <24.0.322.0.10, 24.0.3

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Red Hat, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2023-6787 severity on Zeptric[![CVE-2023-6787](https://zeptric.io/badge/cve/CVE-2023-6787.svg)](https://zeptric.io/cve/CVE-2023-6787)