Keycloak: session hijacking via re-authentication
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Security bypass, Spoofing
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 2 fixed, 1 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-287 and CWE-384.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | keycloak | before 22.0.10; before 24.0.3 | 22.0.10, 24.0.3 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 22 | — | 22.0.10-1 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 22 | — | 22-13 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 22 | — | 22-16 | Patch available | CNA |
| Red Hat | Red Hat build of Keycloak 22.0.10 | — | — | Not affected | CNA |
| Red Hat | Red Hat Single Sign-On 7 | — | — | No fix listed | CNA |
| — | org.keycloak:keycloak-services (Maven) | before 22.0.10 | 22.0.10 | Patch available | GHSA-c9h6-v78w-52wj |
| — | org.keycloak:keycloak-services (Maven) | 23.0.0 to before 24.0.3 | 24.0.3 | Patch available | GHSA-c9h6-v78w-52wj |
- keycloak Vendor— Affected before 22.0.10; before 24.0.3 Fixed in 22.0.10, 24.0.3 Patch available CNA
- Red Hat build of Keycloak 22 VendorRed Hat Affected — Fixed in 22.0.10-1 Patch available CNA
- Red Hat build of Keycloak 22 VendorRed Hat Affected — Fixed in 22-13 Patch available CNA
- Red Hat build of Keycloak 22 VendorRed Hat Affected — Fixed in 22-16 Patch available CNA
- Red Hat build of Keycloak 22.0.10 VendorRed Hat Affected — Fixed in — Not affected CNA
- Red Hat Single Sign-On 7 VendorRed Hat Affected — Fixed in — No fix listed CNA
- org.keycloak:keycloak-services (Maven) Vendor— Affected before 22.0.10 Fixed in 22.0.10 Patch available GHSA-c9h6-v78w-52wj
- org.keycloak:keycloak-services (Maven) Vendor— Affected 23.0.0 to before 24.0.3 Fixed in 24.0.3 Patch available GHSA-c9h6-v78w-52wj
Remediation
- Fix · CNA keycloak Fixed in 22.0.10, 24.0.3
- Fix · GHSA-c9h6-v78w-52wj org.keycloak:keycloak-services (Maven) Fixed in 22.0.10 Advisory →
- Fix · GHSA-c9h6-v78w-52wj org.keycloak:keycloak-services (Maven) Fixed in 24.0.3 Advisory →
Red Hat 2 advisories
- RHSA-2024:1867 Released 2024-04-16 · Red Hat rating ModerateRed Hat build of Keycloak 22.0.10 enhancement and security update
- Red Hat build of Keycloak 22 rhbk/keycloak-operator-bundle, rhbk/keycloak-rhel9, rhbk/keycloak-rhel9-operator
- RHSA-2024:1868 Released 2024-04-16 · Red Hat rating ImportantRed Hat build of Keycloak security update
- Red Hat build of Keycloak 22.0.10
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Single Sign-On 7 | Affected | No fix planned: Will not fix |
| Red Hat build of Keycloak 22 | Fixed | RHSA-2024:1867 |
| Red Hat build of Keycloak 22.0.10 | Fixed | RHSA-2024:1868 |
Timeline
- 2026-10-02 Threatist record created from CVE-2023-6787
- 2026-10-03 Alias added: GHSA-c9h6-v78w-52wj
References
More Red Hat Build Of Keycloak vulnerabilities
- TI-2026-02223 Keycloak: keycloak: unauthorized authentication via disabled saml identity provider CVSS 3.1HIGH 8.1
- TI-2024-01049 Keycloak: path transversal in redirection validation CVSS 3.1HIGH 8.1
- TI-2026-13740 Keycloak-services: keycloak-services: saml idp-initiated broker login bypasses link-only restriction CVSS 3.1CRITICAL 9.8
- TI-2026-13741 Keycloak-services: keycloak-services: saml broker metadata import disables response signature validation CVSS 3.1CRITICAL 9.1
- TI-2026-13106 Keycloak-services: keycloak-services: dcr protocol mapper type-swap policy bypass allows privilege escalation CVSS 3.1HIGH 8.8
- TI-2026-02631 Authentication bypass in Red Hat build of Keycloak 26.2 CVSS 3.1HIGH 8.8
Sources
- CVE-2023-6787 · CVE Program
- CVE-2023-6787 · NVD
- FIRST EPSS
- GHSA-c9h6-v78w-52wj · GitHub Advisory Database · CC BY 4.0
- CVE-2023-6787 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences