Bug 2499591 (CVE-2026-15571) - CVE-2026-15571 keycloak-services: keycloak-services: Predictable account-linking hash enables account takeover via malicious OIDC client
Summary: CVE-2026-15571 keycloak-services: keycloak-services: Predictable account-link...
Keywords:
Status: NEW
Alias: CVE-2026-15571
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-13 07:13 UTC by OSIDB Bzimport
Modified: 2026-08-18 19:49 UTC (History)
29 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-07-13 07:13:11 UTC
A flaw was found in the keycloak-services component, specifically within the legacy client-initiated account-linking endpoint (/realms/{realm}/broker/{provider}/link). The endpoint validates a CSRF protection hash computed as SHA-256(nonce + userSessionId + clientId + providerAlias).
The root cause is that all four inputs to this hash are accessible to a registered OIDC client:
nonce is chosen by the attacker.

userSessionId is leaked as the session_state parameter in standard OIDC authorization responses (handled by OIDCLoginProtocol.java).

clientId and providerAlias are known to the client.


By obtaining the victim's session_state during a normal login flow, a malicious client can compute the required hash and generate a valid account-linking URL. If the client has the manage-account-links role (granted by default via fullScopeAllowed=true), the attacker can silently link their own upstream Identity Provider (IdP) identity to the victim's Keycloak account.
Concrete Impact:
Account Takeover: Attacker gains full access to the victim's account by logging in via the newly linked IdP.

Unauthorized Identity Linking: Attacker can link multiple malicious identities to a single victim account.

Data Exfiltration: Attacker can access all applications and data the victim is authorized to see.


Note You need to log in before you can comment on or make changes to this bug.