CVE-2023-6787: Keycloak: session hijacking via re-authentication
Vulnerability summary
CVE-2023-6787 is a high (CVSS 8.8) Improper Authentication vulnerability in redhat build_of_keycloak. EPSS estimates a 0.74% chance of exploitation in the next 30 days, higher than 54.2% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 0 · Related 3Timeline
- 25-04-2024PublishedVulnerability first disclosed.
- 11-11-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
5 scores · 5 sources · 1 version- CVE.orgCNA6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:NDiffers
- OSV · WolfiEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:NDiffers
- OSV · ChainguardEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:NDiffers
- OSV · MavenEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:NDiffers
EPSS trend
Probability
0.74%
Chance of exploitation in the next 30 days
Percentile
54%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.74% on 23-09-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Redhat2 products
- build_of_keycloakna
- keycloak< 22.0.10 | ≥ 23.0.0, < 24.0.3
Chainguard1 product
- keycloak< 24.0.3-r0
Org.keycloak1 product
- keycloak-services< 22.0.10 | ≥ 23.0.0, < 24.0.3
Wolfi1 product
- keycloak< 24.0.3-r0
4 vendors · 5 products
References
10 links- github.com/keycloak/keycloakPACKAGE