Miggo Logo

CVE-2025-7365: Keycloak vulnerable to phishing attacks through its Review Profile section

5.4

CVSS Score
3.1

Basic Information

EPSS Score
0.00452%
Published
7/10/2025
Updated
7/10/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.keycloak:keycloak-servicesmaven< 26.3.026.3.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a logic flaw in the 'First Broker Login' authentication flow in Keycloak, which occurs when a user logs in via an external Identity Provider (IdP) for the first time. The root cause is a lack of communication between two authenticators in the flow, creating a Time-of-check to Time-of-use (TOCTOU) vulnerability.

  1. Profile Review (IdpReviewProfileAuthenticator.action): During the login flow, the attacker is presented with a 'Review Profile' screen. Here, they can modify their profile information, including their email address. The attacker changes the email to that of a victim. In the vulnerable version, this change was not flagged or recorded as a manual user modification.

  2. Email Verification (IdpEmailVerificationAuthenticator.authenticateImpl): This authenticator executes after the profile review. It is designed to verify the user's email by sending a confirmation link. The flaw was that this function would trust the email address it found in the authentication session, unaware that it had been manually altered by the attacker in the previous step. Consequently, it would send a verification email to the victim's address.

The patch addresses this by introducing a signaling mechanism. The IdpReviewProfileAuthenticator now sets a flag (UPDATE_PROFILE_EMAIL_CHANGED) in the authentication session when the email is changed. The IdpEmailVerificationAuthenticator was modified to check for this flag. If the flag is present, it aborts the email verification process, thereby neutralizing the phishing threat. The exploitation of this vulnerability would involve these two functions executing in sequence.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* *l*w w*s *oun* in K*y*lo*k. W**n *n *ut**nti**t** *tt**k*r *tt*mpts to m*r** ***ounts wit* *not**r *xistin* ***ount *urin* *n i**ntity provi**r (I*P) lo*in, t** *tt**k*r will su*s*qu*ntly ** prompt** to "r*vi*w pro*il*" in*orm*tion. T*is vuln*r**il

Reasoning

T** vuln*r**ility is * lo*i* *l*w in t** '*irst *rok*r Lo*in' *ut**nti**tion *low in K*y*lo*k, w*i** o**urs w**n * us*r lo*s in vi* *n *xt*rn*l I**ntity Provi**r (I*P) *or t** *irst tim*. T** root **us* is * l**k o* *ommuni**tion **tw**n two *ut**nti