{"id":"CVE-2023-6787","summary":"Keycloak: session hijacking via re-authentication","details":"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.","aliases":["GHSA-c9h6-v78w-52wj"],"modified":"2026-08-12T03:51:09.137780325Z","published":"2024-04-25T16:02:32.916Z","related":["CGA-497w-v44m-5q6r"],"database_specific":{"cna_assigner":"redhat","cwe_ids":["CWE-287"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/6xxx/CVE-2023-6787.json"},"references":[{"type":"WEB","url":"https://access.redhat.com/downloads/content/package-browser/"},{"type":"WEB","url":"https://catalog.redhat.com/software/containers/"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2024:1867"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2024:1868"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2023-6787"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/6xxx/CVE-2023-6787.json"},{"type":"ADVISORY","url":"https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-6787"},{"type":"REPORT","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2254375"},{"type":"PACKAGE","url":"https://github.com/keycloak/keycloak"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/keycloak/keycloak","events":[{"introduced":"0"},{"fixed":"bf8c3c32e53449a632381605f1162fafe9abe8eb"},{"introduced":"1d4ce3d8e9dbc9af996f9248996c78e145902a35"},{"fixed":"27d38787d9eae0854f79a358cda77f834008b71a"}],"database_specific":{"cpe":"cpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"22.0.10"},{"introduced":"23.0.0"},{"fixed":"24.0.3"}],"source":"CPE_RANGE"}}],"versions":["2.4.0.Test","1.3.0.Final","1.1.0.Beta2","1.0.0.Final","1.0-final","1.0-rc-1","1.0-beta-4","1.0-beta-2","1.0-beta-1","1.0-alpha-3","1.0-alpha-2","1.0-alpha-1","1.0-alpha-1-12062013"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-6787.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"}]}