8.8
HIGH
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 :

June 30, 2025, 1:49 p.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

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 Redhat keycloak
2 Redhat build_of_keycloak
1 Keycloak keycloak
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2023-6787.

URL Resource
https://access.redhat.com/errata/RHSA-2024:1867 Vendor Advisory
https://access.redhat.com/errata/RHSA-2024:1868 Vendor Advisory
https://access.redhat.com/security/cve/CVE-2023-6787 Vendor Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2254375 Issue Tracking Vendor Advisory
https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj Vendor Advisory
https://access.redhat.com/errata/RHSA-2024:1867 Vendor Advisory
https://access.redhat.com/errata/RHSA-2024:1868 Vendor Advisory
https://access.redhat.com/security/cve/CVE-2023-6787 Vendor Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2254375 Issue Tracking Vendor Advisory

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.

  • Initial Analysis by [email protected]

    Jun. 30, 2025

    Action Type Old Value New Value
    Added CVSS V3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
    Added CPE Configuration OR *cpe:2.3:a:redhat:build_of_keycloak:-:*:*:*:text-only:*:*:* *cpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:* versions up to (excluding) 22.0.10 *cpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:* versions from (including) 23.0.0 up to (excluding) 24.0.3
    Added Reference Type CVE: https://access.redhat.com/errata/RHSA-2024:1867 Types: Vendor Advisory
    Added Reference Type Red Hat, Inc.: https://access.redhat.com/errata/RHSA-2024:1867 Types: Vendor Advisory
    Added Reference Type CVE: https://access.redhat.com/errata/RHSA-2024:1868 Types: Vendor Advisory
    Added Reference Type Red Hat, Inc.: https://access.redhat.com/errata/RHSA-2024:1868 Types: Vendor Advisory
    Added Reference Type CVE: https://access.redhat.com/security/cve/CVE-2023-6787 Types: Vendor Advisory
    Added Reference Type Red Hat, Inc.: https://access.redhat.com/security/cve/CVE-2023-6787 Types: Vendor Advisory
    Added Reference Type CVE: https://bugzilla.redhat.com/show_bug.cgi?id=2254375 Types: Issue Tracking, Vendor Advisory
    Added Reference Type Red Hat, Inc.: https://bugzilla.redhat.com/show_bug.cgi?id=2254375 Types: Issue Tracking, Vendor Advisory
    Added Reference Type Red Hat, Inc.: https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj Types: Vendor Advisory
  • 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
© cvefeed.io
Latest DB Update: Jul. 16, 2025 11:06