Skip to content
Fencer Vulns
medium 6.5

CVE-2023-6787 json

Keycloak: session hijacking via re-authentication

published 2024-04-17 2 y ago modified 2026-09-10 1 mo ago also GHSA-c9h6-v78w-52wj , EUVD-2024-1185

cvss
6.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.7%
EPSS 0.7% chance of exploitation in 30 days, percentile 55%
public exploits
0
none known

Summary

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.

Patch / fix

  • maven org.keycloak:keycloak-services 22.0.10, 24.0.3
  • Red Hat Red Hat build of Keycloak 22 22-13, 22-16, 22.0.10-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2023-6787 updated cvss 6.5

keycloak: session hijacking via re-authentication

  • Red Hat Single Sign-On 7 rh-sso7-keycloak rh-sso7-keycloak
    affected: no fix planned “Will not fix”
  • Red Hat build of Keycloak 22 rhbk/keycloak-rhel9 22-13, rhbk/keycloak-rhel9-operator 22-16, rhbk/keycloak-operator-bundle 22.0.10-1
    fixed: vendor fix RHSA-2024:1867
  • Red Hat build of Keycloak 22.0.10
    fixed: vendor fix RHSA-2024:1868

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

0.74% chance of exploitation in the next 30 days, higher than 55% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
NVD 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
GitHub 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Affected packages

ecosystem package affected fixed in
maven org.keycloak:keycloak-services
<22.0.10
>=23.0.0, <24.0.3
22.0.10
24.0.3

Affected products

  • Red Hat Red Hat build of Keycloak 22
  • Red Hat Red Hat build of Keycloak 22.0.10
  • Red Hat Red Hat Single Sign-On 7

Classification

Weakness
  • CWE-287 Improper Authentication
  • CWE-384 Session Fixation
  • CWE-613 DEPRECATED: Insufficient Session Expiration

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.