CVE-2023-6787
Keycloak: session hijacking via re-authentication
- Published
- Updated
- Reserved
- Assigned by
- redhat
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.
Timeline
ID reserved
By redhat
- 4 months later
· 4 months later
Published
- 19 months later
· 19 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| redhatCNA (assigner) | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVDNVD · Analyzed | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.74% · top 45% of all CVEs (8 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.5.
Weakness
Affected products
keycloak
- affected < 22.0.10
- affected < 24.0.3
Red Hat · Red Hat build of Keycloak 22
- unaffected 22.0.10-1 – < *
Red Hat · Red Hat build of Keycloak 22
- unaffected 22-13 – < *
Red Hat · Red Hat build of Keycloak 22
- unaffected 22-16 – < *
Red Hat · Red Hat build of Keycloak 22.0.10
All versions: unaffected
Red Hat · Red Hat Single Sign-On 7
All versions: affected
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Mavenorg.keycloak:keycloak-servicesGHSA-c9h6-v78w-52wj (opens in a new tab)
References (5)
- RHSA-2024:1867 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- RHSA-2024:1868 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- https://access.redhat.com/security/cve/CVE-2023-6787 (opens in a new tab)vdb-entryx_refsource_REDHATx_transferred
- RHBZ#2254375 (opens in a new tab)issue-trackingx_refsource_REDHATx_transferred
- https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-c9h6-v78w-52wj (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2023-6787)Record last updated .