6.5
MEDIUM
CVE-2023-6787
Keycloak Session Hijacking Vulnerability
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.

INFO

Published Date :

April 25, 2024, 4:15 p.m.

Last Modified :

March 14, 2025, 3:15 p.m.

Remotely Exploitable :

Yes !

Impact Score :

3.6

Exploitability Score :

2.8
Affected Products

The following products are affected by CVE-2023-6787 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Keycloak keycloak

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2023-6787 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2023-6787 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    Mar. 14, 2025

    Action Type Old Value New Value
    Added Reference https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj
  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2024:1867
    Added Reference https://access.redhat.com/errata/RHSA-2024:1868
    Added Reference https://access.redhat.com/security/cve/CVE-2023-6787
    Added Reference https://bugzilla.redhat.com/show_bug.cgi?id=2254375
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Jul. 03, 2024

    Action Type Old Value New Value
    Added CWE CISA-ADP CWE-287
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Received by [email protected]

    Apr. 25, 2024

    Action Type Old Value New Value
    Added 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.
    Added Reference Red Hat, Inc. https://access.redhat.com/errata/RHSA-2024:1867 [No types assigned]
    Added Reference Red Hat, Inc. https://access.redhat.com/errata/RHSA-2024:1868 [No types assigned]
    Added Reference Red Hat, Inc. https://access.redhat.com/security/cve/CVE-2023-6787 [No types assigned]
    Added Reference Red Hat, Inc. https://bugzilla.redhat.com/show_bug.cgi?id=2254375 [No types assigned]
    Added CWE Red Hat, Inc. CWE-287
    Added CVSS V3.1 Red Hat, Inc. AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2023-6787 is associated with the following CWEs:

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability