Skip to content

fix(login): prevent user enumeration via differential password reset UI#41586

Open
DeepDiver1975 wants to merge 3 commits into
masterfrom
security/fix-login-user-enumeration
Open

fix(login): prevent user enumeration via differential password reset UI#41586
DeepDiver1975 wants to merge 3 commits into
masterfrom
security/fix-login-user-enumeration

Conversation

@DeepDiver1975
Copy link
Copy Markdown
Member

Summary

  • showLoginForm() showed different UI for LDAP users (no "Reset it?" link) vs non-existent users, creating an unauthenticated oracle to enumerate LDAP users
  • Fix removes the canChangePassword() backend check; canResetPassword is always true unless lost_password_link=disabled
  • Response is now identical for LDAP users, standard users, and non-existent users

Security Impact

Low — user enumeration limited to backends without password-change support (e.g. LDAP); requires login attempts

Note

This PR touches the same files as security/fix-login-brute-force — merge that one first.

Test plan

  • testShowLoginFormCanResetPasswordUniformForNonExistentUser and updated existing tests assert canResetPassword=true regardless of backend type; fail without fix
  • Run make test TEST_PHP_SUITE=core/Controller

🤖 Generated with Claude Code

showLoginForm() called userManager->get($user) and checked
canChangePassword() to decide whether to show "Wrong password. Reset it?"
or just "Wrong password.". LDAP users (canChangePassword=false) produced
a different UI than non-existent users (check skipped), giving attackers
an oracle to identify users on non-password-change backends.

Remove the backend capability check entirely. canResetPassword now stays
true unless lost_password_link is explicitly set to "disabled", making
the login-failure response identical for all users.

Signed-off-by: Thomas Müller <thomas.mueller@owncloud.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@update-docs
Copy link
Copy Markdown

update-docs Bot commented Jun 5, 2026

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
…arning

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant