REDHAT-BUG-2587765: High severity Red Hat Keycloak vulnerability
A flaw was found in the Keycloak first broker login flow. When a user is prompted to review their profile because an account already exists, submitting the Review profile form a second time without changes causes Keycloak to clear the internal marker that tracks if the email or username was edited. This occurs because the state is not correctly preserved across multiple submissions of the updateProfile action. Exploitation requires the attacker to have an account at a configured identity provider. In one scenario, this allows an attacker to bypass the fix for CVE-2025-7365 and send a genuine account-linking email to a victim. If the victim clicks the link, the attacker gains full access to the victim account. In another scenario, if Trust Email is enabled, an attacker can create a new account with an arbitrary email address marked as verified without any actual verification occurring.
Affected Software
Event History
Frequently Asked Questions
Which environments are exposed to the account-linking impact?
The attacker must have an account at an identity provider configured in Keycloak and be able to reach the first broker login Review profile flow. The account-linking scenario also requires a victim to click the genuine account-linking email sent by Keycloak.
What additional risk exists when Trust Email is enabled?
With Trust Email enabled, an attacker can create a new account using an arbitrary email address and have that address marked verified without completing actual email verification.
Does exploitation require the attacker to already control a Keycloak account?
The stated prerequisite is an account at a configured identity provider. The issue is triggered through repeated submission of the Review profile form during first broker login.