{"id":"CVE-2023-6787","state":"PUBLISHED","title":"Keycloak: session hijacking via re-authentication","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.","publishedAt":"2024-04-25T16:02:32.916Z","updatedAt":"2025-11-11T15:57:32.291Z","severity":{"score":6.5,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","source":"redhat"},"assigner":"redhat","products":["keycloak","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"],"affected":[{"packageName":"keycloak","versions":[{"version":"0","status":"affected","lessThan":"22.0.10","versionType":"semver"},{"version":"0","status":"affected","lessThan":"24.0.3","versionType":"semver"}],"collectionURL":"https://github.com/keycloak/keycloak"},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22","packageName":"rhbk/keycloak-operator-bundle","defaultStatus":"affected","versions":[{"version":"22.0.10-1","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:build_keycloak:22::el9"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22","packageName":"rhbk/keycloak-rhel9","defaultStatus":"affected","versions":[{"version":"22-13","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:build_keycloak:22::el9"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22","packageName":"rhbk/keycloak-rhel9-operator","defaultStatus":"affected","versions":[{"version":"22-16","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:build_keycloak:22::el9"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22.0.10","packageName":"keycloak-core","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:build_keycloak:22"]},{"vendor":"Red Hat","product":"Red Hat Single Sign-On 7","packageName":"rh-sso7-keycloak","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:red_hat_single_sign_on:7"]}],"references":["https://access.redhat.com/errata/RHSA-2024:1867","https://access.redhat.com/errata/RHSA-2024:1868","https://access.redhat.com/security/cve/CVE-2023-6787","https://bugzilla.redhat.com/show_bug.cgi?id=2254375","https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj"],"weaknesses":["CWE-287"],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/6xxx/CVE-2023-6787.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-6787","state":"PUBLISHED","datePublished":"2024-04-25T16:02:32.916Z","dateUpdated":"2025-11-11T15:57:32.291Z","assignerShortName":"redhat","assignerOrgId":"53f830b8-0a3f-465b-8143-3b8a9948e749","dateReserved":"2023-12-13T16:22:00.344Z"},"containers":{"cna":{"title":"Keycloak: session hijacking via re-authentication","descriptions":[{"lang":"en","value":"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":[{"packageName":"keycloak","versions":[{"version":"0","status":"affected","lessThan":"22.0.10","versionType":"semver"},{"version":"0","status":"affected","lessThan":"24.0.3","versionType":"semver"}],"collectionURL":"https://github.com/keycloak/keycloak"},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22","packageName":"rhbk/keycloak-operator-bundle","defaultStatus":"affected","versions":[{"version":"22.0.10-1","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:build_keycloak:22::el9"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22","packageName":"rhbk/keycloak-rhel9","defaultStatus":"affected","versions":[{"version":"22-13","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:build_keycloak:22::el9"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22","packageName":"rhbk/keycloak-rhel9-operator","defaultStatus":"affected","versions":[{"version":"22-16","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:build_keycloak:22::el9"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 22.0.10","packageName":"keycloak-core","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:build_keycloak:22"]},{"vendor":"Red Hat","product":"Red Hat Single Sign-On 7","packageName":"rh-sso7-keycloak","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:red_hat_single_sign_on:7"]}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2024:1867","name":"RHSA-2024:1867","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2024:1868","name":"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","name":"RHBZ#2254375","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://github.com/keycloak/keycloak/security/advisories/GHSA-c9h6-v78w-52wj"}],"metrics":[{"other":{"content":{"value":"Moderate","namespace":"https://access.redhat.com/security/updates/classification/"},"type":"Red Hat severity rating"}},{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":6.5,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","version":"3.1"},"format":"CVSS"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-287","description":"Improper Authentication","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat","orgId":"53f830b8-0a3f-465b-8143-3b8a9948e749","dateUpdated":"2025-11-11T15:57:32.291Z"},"datePublic":"2024-02-21T00:00:00.000Z","x_redhatCweChain":"CWE-287: Improper Authentication","timeline":[{"lang":"en","time":"2023-05-03T00:00:00.000Z","value":"Reported to Red Hat."},{"lang":"en","time":"2024-02-21T00:00:00.000Z","value":"Made public."}]},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2023-6787","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-04-25T19:40:17.217959Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-287","lang":"en","type":"CWE","description":"CWE-287 Improper Authentication"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:17:12.505Z"}},{"title":"CVE Program Container","references":[{"url":"https://access.redhat.com/errata/RHSA-2024:1867","name":"RHSA-2024:1867","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred"]},{"url":"https://access.redhat.com/errata/RHSA-2024:1868","name":"RHSA-2024:1868","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred"]},{"url":"https://access.redhat.com/security/cve/CVE-2023-6787","tags":["vdb-entry","x_refsource_REDHAT","x_transferred"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2254375","name":"RHBZ#2254375","tags":["issue-tracking","x_refsource_REDHAT","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T08:42:07.631Z"}}]}}}