Skip to content

Add Keycloak reset credentials flow account takeover module (CVE-2026-18963) - #21851

Open
M4xSec wants to merge 1 commit into
rapid7:masterfrom
M4xSec:keycloak-reset-credentials-ato
Open

Add Keycloak reset credentials flow account takeover module (CVE-2026-18963)#21851
M4xSec wants to merge 1 commit into
rapid7:masterfrom
M4xSec:keycloak-reset-credentials-ato

Conversation

@M4xSec

@M4xSec M4xSec commented Aug 30, 2026

Copy link
Copy Markdown

Summary

Auxiliary module for CVE-2026-18963. Keycloak 26.7.0 and 26.7.1 ship a broken
"try another way" credential selector in the reset-credentials (Forgot Password)
flow. The selector stores an authentication-session note that is not scoped to the
current authenticator execution, so an attacker can drive the email reset
authenticator to success() without ever submitting the one-time token Keycloak
mailed to the account owner. The flow then advances to the update-password screen,
letting an unauthenticated attacker set a new password for any account in a realm
that has Forgot Password enabled.

Version is not disclosed over HTTP, so check confirms the reset-credentials flow
is reachable rather than fingerprinting a build; run proves the finding by setting
a password and logging in with it.

Fixed in Keycloak 26.7.2.

Verification

  • Start Keycloak 26.7.1 with a realm that has Forgot Password enabled and a victim user
  • use auxiliary/admin/http/keycloak_reset_credentials_ato
  • set RHOSTS, REALM, VICTIM
  • check reports the reset-credentials flow is enabled
  • run
  • Confirm the module reaches the update-password screen, sets a new password, and logs in as the victim

Tested against Keycloak 26.7.1.

Adds auxiliary/admin/http module for CVE-2026-18963. Keycloak 26.7.0 and 26.7.1
ship a broken "try another way" credential selector in the reset-credentials
(Forgot Password) flow. The selector stores an authentication session note that
is not scoped to the current authenticator execution, so an attacker can drive
the email reset authenticator to success without ever submitting the one-time
token that Keycloak mailed to the account owner. The flow then advances to the
update-password screen, letting an unauthenticated attacker set a new password
for any account in a realm that has Forgot Password enabled.

Fixed in Keycloak 26.7.2.

Tested against Keycloak 26.7.1.

Signed-off-by: venexy <predator0x300@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant