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.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.7%top 45.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Mavenorg.keycloak:keycloak-services22.0.10GHSA-c9h6-v78w-52wj
Mavenorg.keycloak:keycloak-services24.0.3GHSA-c9h6-v78w-52wj

Affected products (as reported)

VendorProductVersions
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