Skip to content

Password reset email path lacks cooldown allowing anonymous inbox flooding #55244

Description

@msdaly200

Describe the bug

The standalone password-reset flow (/realms/{realm}/login-actions/reset-credentials) has no application-level cooldown or per-user limit on reset emails. Each eligible request creates a new action token and sends a reset email. The verify-email and update-email flows use EmailCooldownManager to rate-limit emails, but ResetCredentialEmail does not.

An unauthenticated user who knows a valid username or email address can trigger repeated reset emails to that user's inbox. The impact is limited to inbox flooding for a targeted user and extra SMTP load. It does not lead to account compromise or data exposure.

Classification: weakness (hardening)

Version: Present in main

Expected behavior

Repeated reset-credentials requests for the same user within a short period should not each send an email. The response should stay the same generic response, so it doesn't reveal whether the account exists, but the email send should be suppressed. This is how the verify-email and update-email flows already behave.

Actual behavior

Every eligible reset-credentials request sends a new reset email, with no cooldown or limit.

Affected components

  • LoginActionsService: the /login-actions/reset-credentials endpoint, which creates a new authentication session for each anonymous request.
  • ResetCredentialChooseUser: selects the user from the submitted username or email.
  • ResetCredentialEmail: creates a new action token and sends the reset email on every eligible request, without checking EmailCooldownManager.
  • DefaultEmailSenderProvider: sends the email synchronously, so each accepted request uses real outbound mail work.

This issue was originally tracked in the private repository. Migrated by @msdaly200.

Activity

  1. added
    area/authentication
    priority/important
    on Nov 16, 2026
  2. self-assigned this
    on Nov 17, 2026
  3. added 4 commits that reference this issue on Nov 18, 2026
    d33371d
    4eaea57
    dd67795
    d1ee405
  4. admanzoni commented on Nov 20, 2026

    @admanzoni

    Hi there 👋🏽

    We've been experiencing the same issue. Our brute force policy kicked in, but our user get reset password email, which is very annoying.

    Is there any remediation recommended ? Because desactivating the Reset Password at realm level, won't really work for us

    Thanks for your answers

  5. gaoyikeshuer commented on Nov 20, 2026

    @gaoyikeshuer
    Contributor

    Hi there 👋🏽

    We've been experiencing the same issue. Our brute force policy kicked in, but our user get reset password email, which is very annoying.

    Is there any remediation recommended ? Because desactivating the Reset Password at realm level, won't really work for us

    Thanks for your answers

    Hi @admanzoni thanks for the report. it matches what this issue describes. Just wondering which version of keycloak are you running? there is a fix in review now in #55308 (which will goes to main branch for next release). It adds a cooldown setting on the "Send Reset Email" step in the reset credentials flow, default 30 sec, 0 to disable. If someone requests again inside the cooldown, the form looks the same but no email is sent, and you get a SEND_RESET_PASSWORD_ERROR event with error slow_down in the event log. and it's a throttle, not a block. the attacker can still trigger one email per cooldown window, so probably set it higher than 30 sec for your case. Will update here once we know which release it goes in.

    About the brute force part. yes, brute force lockout does not stop reset emails today, that's a different code path and not part of #55308. Feel free to open a separate issue for it, and we will look at that.

    For now the only real workaround for you probably is outside Keycloak: rate limit POST /realms/{realm}/login-actions/reset-credentials on your reverse proxy / WAF, per IP (and per username/email if your WAF can read the form body). That way forgot password keeps working for everyone else.

  6. admanzoni commented on Nov 20, 2026

    @admanzoni

    Hi @gaoyikeshuer

    Thanks for your response !
    We are on 26.8.2 and we follow your release cycle thoroughly given the actual context of permanent security threats 😄
    So we will be testing the next release, thanks for that !

    For the time being, we have deactivated the Reset user password feature at realm level, because it was disturbing our users.
    I'll review the slow down fix with my security team.

  7. added 3 commits that reference this issue on Nov 20, 2026
    04e18ef
    7e514a8
    421c26b
  8. added a commit that references this issue on Nov 20, 2026
    d0284ff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/authenticationbackport/26.8kind/weaknesspriority/importantrelease/27.0.0team/core-authn

Fields

No fields configured for weakness.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions