CVE-2023-6787 | Keycloak: session hijacking via re-authentication

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.

Published: 2024-04-25 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-6787 is rated Moderate Risk (43.6/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.74%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2023-6787

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.57% 0.74% +0.17%
2 2026-05-14 0.40% 0.57% +0.18%
3 2025-11-21 0.40%

Full EPSS history (10 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-6787

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.5 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 3.6 [email protected]
8.8 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.8 5.9 [email protected]

Weakness enumeration for CVE-2023-6787

GitHub Security Advisory for CVE-2023-6787

GHSA-c9h6-v78w-52wj · Severity: medium · Ecosystem: maven — Keycloak vulnerable to session hijacking via re-authentication

OS Trackers for CVE-2023-6787

vendor priority summary link
redhat medium https://access.redhat.com/security/cve/CVE-2023-6787

Affected software / configurations for CVE-2023-6787

Vendor Product Version Raw CPE
redhat build_of_keycloak cpe:2.3:a:redhat:build_of_keycloak:-:*:*:*:text-only:*:*:*
redhat keycloak < 22.0.10 cpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:*
redhat keycloak >= 23.0.0, < 24.0.3 cpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:*

References for CVE-2023-6787

cvelogic Threat Intelligence