{"id":"CVE-2023-6787","published":"2024-04-25T16:02:32Z","modified":"2025-11-11T15:57:32Z","title":"Keycloak: session hijacking via re-authentication","vendor":"Red Hat","product":"Red Hat build of Keycloak 22","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00744,"percentile":0.55666,"provenance":"source"},"cwes":[{"id":"CWE-287","name":"Improper Authentication"}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2024:1867","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2024:1868","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/security/cve/CVE-2023-6787","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2254375","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj","tags":[]}],"priority":{"score":15.7,"factors":[{"name":"EPSS percentile","points":11.13},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"red-hat","affectedVersions":[{"vendor":null,"product":null,"versions":["< 22.0.10","< 24.0.3"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22","versions":["all versions"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22","versions":["all versions"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22","versions":["all versions"]},{"vendor":"Red Hat","product":"Red Hat Single Sign-On 7","versions":["all versions"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-04-25T19:40:17.217959Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"org.keycloak:keycloak-services","vulnerableRanges":["<22.0.10",">=23.0.0, <24.0.3"],"patched":["22.0.10","24.0.3"],"from":["GHSA-c9h6-v78w-52wj"],"provenance":"source"}],"summary":{"text":"The flaw is in the re-authentication mechanism within org.keycloak.authentication in Red Hat build of Keycloak 22, where a new authentication triggered by the \"prompt=login\" query parameter can leave an active session's identifier reusable. An unauthenticated remote attacker who can get a user to interact with a crafted link and then select \"Restart login\" during the forced re-authentication can cause the new session, which has a different SUB, to retain the same SID as the previous session, enabling account takeover.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:29:20Z"},"euvd":{"id":"EUVD-2024-1185","exploited":false,"provenance":"source"}}