Vulnerability · Published Apr 25, 2024 · Assigned by redhat
CVE-2023-6787Keycloak: session hijacking via re-authentication
Medium 6.5
In plain English
A medium-severity improper authentication in keycloak. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 55% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | org.keycloak:keycloak-services | 22.0.10 | GHSA-c9h6-v78w-52wj |
| Maven | org.keycloak:keycloak-services | 24.0.3 | GHSA-c9h6-v78w-52wj |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| keycloak | 0 – before 22.0.100 – before 24.0.3 | |
| Red Hat | Red Hat build of Keycloak 22 | see references |
| Red Hat | Red Hat build of Keycloak 22 | see references |
| Red Hat | Red Hat build of Keycloak 22 | see references |
| Red Hat | Red Hat build of Keycloak 22.0.10 | see references |
| Red Hat | Red Hat Single Sign-On 7 | see references |
Weakness: CWE-287 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
References
- RHSA-2024:1867 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:1868 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2023-6787 vdb-entry, x_refsource_REDHAT
- RHBZ#2254375 issue-tracking, x_refsource_REDHAT
- https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj