Start with Identity
Identity CVE · OAuth / OIDC / JWT

CVE-2023-6787Keycloak session hijack via prompt=login re-authentication

high
Product: KeycloakVendor: Red HatDisclosed: 2024-04-17Status: PatchedProtocol deep diveNVD ↗

What broke

Keycloak's re-authentication path (prompt=login) could attach a new login to someone else's active session. A session that looked like step-up was a session hijack. Assigned CVE-2023-6787, public with the April 2024 Keycloak/RHSA train (alongside CVE-2023-6544 and CVE-2023-6717).

Why it matters

prompt=login is how apps force a fresh password or MFA. If that flow can steal a session, step-up is an attack. Same class as Citrix Bleed: the session is the credential.

What to do

  • Upgrade Keycloak to the April 2024 patched line or later.
  • After upgrade, invalidate sessions if the realm was public while vulnerable.
  • Confirm step-up still binds to the existing sub and does not mint a new session for a different user.

After you patch

Token-layer flaws produce credentials that keep working after the patch, so remediation is about invalidating what was issued.

  • Rotate the signing keys published at your JWKS endpoint, then confirm relying parties refetch on an unknown key id rather than caching indefinitely.
  • Revoke refresh tokens and sessions. Access tokens expire on their own; refresh tokens are the ones that turn a short compromise into months of access.
  • Audit client registrations and consent grants created during the window, particularly any client with broad scopes or a redirect URI you do not recognize.
  • Verify validation on your side: pinned algorithms, issuer and audience checks, and no acceptance of alg: none. See JWT and the validate a JWT recipe.

Sources

Last reviewed By SWI Community TeamSuggest a correctionHow we research

Technique

This CVE is an instance of Session cookie theft. A session cookie is a bearer credential that proves nothing beyond possession. Whoever copies it inherits the logged-in session, skipping the password and the MFA challenge that produced it.

Know a primary source we should add, or a patch status that has changed? Email community@startwithidentity.com. See all briefs in the identity CVE catalog, or volunteer as a CVE Analyst.
Compiled from vendor advisories, NVD, CISA KEV, and public research. CVSS figures can disagree across NVD and the CNA. Confirm affected versions against the vendor advisory before you patch. Independent, community-driven analysis. See the disclaimer.