Repository navigation
Description
Describe the bug
A flaw was found in Keycloak's first broker login flow. When a user confirms an identity provider account-link request from a separate browser context, Keycloak creates a server-side single-use object (SUO) proof in addition to completing the link through the original authentication session. This proof is not consumed when the original session successfully completes the link, and it is not revoked when the user later removes the identity provider link through the Account self-service API (DELETE /realms/{realm}/account/linked-accounts/{providerAlias}). An attacker who controls the matching upstream identity can exploit the residual proof within its validity window to silently restore the removed federated link and authenticate as the victim without requiring a new confirmation from the victim.
This is a follow-on to CVE-2026-9087, which bound the proof to the local user ID, identity-provider alias, and upstream external ID. The defect reported here concerns when that proof must stop being usable: one cross-browser confirmation currently authorizes two independent continuation paths, and neither the original session completing the link nor the victim's explicit unlink terminates the fallback proof.
This is tracked as CVE-2026-92358.
Version
Reproduced on Keycloak 26.7.2 (quay.io/keycloak/keycloak digest sha256:831330513f55695572286e521f94fcd3c7e285250ed5b848090265a33192f669) and on main at revision 783ca364d326223c238dd455c57a10b241ffb4c5.
Expected behavior
The server-side SUO proof should be treated as a single atomic authorization grant shared between the original-session and fresh-session continuation paths. Once the original authentication session successfully completes the account link, the corresponding SUO proof should be consumed and the alternate continuation path rendered unusable. Additionally, when a user removes a federated identity via Account self-service, every outstanding account-link proof associated with that exact federated identity should be revoked, so that a subsequent fresh broker login requires a new confirmation.
Actual behavior
After a cross-browser confirmation, the SUO proof remains valid even after the original session completes the link and even after the victim explicitly unlinks the identity provider. Within the proof's validity window (default 300 seconds), an attacker authenticating with the same upstream identity can silently restore the removed federated link and receive an authenticated session as the victim. The restored link is persistent account state and can be used for repeated logins until the victim unlinks again and the proof has been consumed.
Anything else?
- Root cause:
IdpVerifyAccountLinkActionTokenHandlerwrites a SUO proof viasetUserVerifiedSingleObjectduring cross-browser confirmation.IdpEmailVerificationAuthenticatorcompletes the original session via auth note andcontext.successwithout consuming that proof.LinkedAccountsResource.removeLinkedAccountremoves the federated identity but does not revoke the outstanding proof. A subsequentIdpCreateUserIfUniqueAuthenticatorcall torunIfUserVerifiedconsumes the proof, restores the link, and completes authentication as the victim. - Related public issues: Linking user in different browser doesn't work if original window/tab is closed #37559, [CVE-2026-9087] Cross-Session Email Verification Proof Not Bound to Upstream Identity in First-Broker-Login #49175
- Related CVE: CVE-2026-9087 ([CVE-2026-9087] Cross-Session Email Verification Proof Not Bound to Upstream Identity in First-Broker-Login #49175) — sibling issue that introduced the identity binding this issue preserves.
This issue was originally tracked in the private repository. Migrated by @abstractj.
Metadata
Metadata
Assignees
Labels
Type
Fields
Projects
- StatusShow more project fieldsDone
Activity
[-][CVE-2026-92358] 【Vulnerability Report】Cross-browser fallback proof survives successful account linking and self-service unlink[/-][+][CVE-2026-92358] Cross-browser fallback proof survives successful account linking and self-service unlink[/+]10 remaining items
fixes CVE-2026-92358 by removing stale SUO proof (keycloak#53418)
fixes CVE-2026-92358 by removing stale SUO proof (#53418) (#54000)
fixes CVE-2026-92358 by removing stale SUO proof (keycloak#53418)
fixes CVE-2026-92358 by removing stale SUO proof (keycloak#53418)