CVE-2023-6787
HIGH 8.8CVSS 3.1Keycloak vulnerable to 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
- 25 Apr 2024
- Last modified
- 10 Sep 2026
- Assigned by
- secalert@redhat.com
- NVD status
- Analyzed
- Weakness
- CWE-287CWE-384CWE-613
- Also known as
- GHSA-c9h6-v78w-52wj
- Sources
- NVDJSONOSV GHSA-c9h6-v78w-52wjJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | secalert@redhat.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | redhat | build_of_keycloakcpe:2.3:a:redhat:build_of_keycloak:-:*:*:*:text-only:*:*:* |
(no version) | |
| NVD | redhat | keycloakcpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:* |
< 22.0.10 | 22.0.10 |
| NVD | redhat | keycloakcpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:* |
>= 23.0.0, < 24.0.3 | 24.0.3 |
| OSV | Maven | org.keycloak:keycloak-services | < 22.0.10 | 22.0.10 |
| OSV | Maven | org.keycloak:keycloak-services | >= 23.0.0, < 24.0.3 | 24.0.3 |
References
- https://access.redhat.com/errata/RHSA-2024:1867 · Vendor Advisory, WEB
- https://access.redhat.com/errata/RHSA-2024:1868 · Vendor Advisory, WEB
- https://access.redhat.com/security/cve/CVE-2023-6787 · Vendor Advisory, WEB
- https://bugzilla.redhat.com/show_bug.cgi?id=2254375 · Issue Tracking, Vendor Advisory, WEB
- https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2023-6787 · ADVISORY
- https://github.com/keycloak/keycloak · PACKAGE
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 25 Apr 2024)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 17 Apr 2024)