Moderate severityOSV Advisory· Published Apr 25, 2024· Updated Nov 11, 2025
Keycloak: session hijacking via re-authentication
CVE-2023-6787
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
org.keycloak:keycloak-servicesMaven | < 22.0.10 | 22.0.10 |
org.keycloak:keycloak-servicesMaven | >= 23.0.0, < 24.0.3 | 24.0.3 |
Affected products
16- Range: 1.0-alpha-1, 1.0-alpha-1-12062013, 1.0-alpha-2, …
- osv-coords15 versionspkg:apk/chainguard/keycloakpkg:apk/chainguard/keycloak-bitnami-compatpkg:apk/chainguard/keycloak-bitnami-fipspkg:apk/chainguard/keycloak-compatpkg:apk/chainguard/keycloak-fipspkg:apk/chainguard/keycloak-fips-bitnami-compatpkg:apk/chainguard/keycloak-fips-policy-140-2pkg:apk/chainguard/keycloak-fips-policy-140-3pkg:apk/chainguard/keycloak-iamguarded-compatpkg:apk/chainguard/keycloak-iamguarded-fipspkg:apk/wolfi/keycloakpkg:apk/wolfi/keycloak-bitnami-compatpkg:apk/wolfi/keycloak-compatpkg:apk/wolfi/keycloak-iamguarded-compatpkg:maven/org.keycloak/keycloak-services
< 24.0.3-r0+ 14 more
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 24.0.3-r0
- (no CPE)range: < 22.0.10
Patches
Vulnerability mechanics
References
7- access.redhat.com/errata/RHSA-2024:1867ghsavendor-advisoryx_refsource_REDHATWEB
- access.redhat.com/errata/RHSA-2024:1868ghsavendor-advisoryx_refsource_REDHATWEB
- github.com/advisories/GHSA-c9h6-v78w-52wjghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2023-6787ghsaADVISORY
- access.redhat.com/security/cve/CVE-2023-6787ghsavdb-entryx_refsource_REDHATWEB
- bugzilla.redhat.com/show_bug.cgighsaissue-trackingx_refsource_REDHATWEB
- github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wjghsaWEB
News mentions
0No linked articles in our index yet.