Security: wrong login reveals registered users
-
Hey there,
you can see if a user with a given email address has an account when you try to reset your password with that address. It says “user does not exist” which is not really best security practice… – Any chance to change that?
I could edit the translation to “yea, I send you an email, no worries!”, but there will still be a revaling error message with that…
Any ideas?
Thanks in advance!
nils
-
Hi @nils235
The text “User does not exist” is not added by UM. Are you using the Ultimate Member Login form? Could you please provide a screenshot of the text that you’re seeing? You can upload the screenshot via imgur.com and then share the image URL here so we can review it.
Regards,
I was paraphrasing, the exact message is “We can’t find an account registered with that address or username”.
It’s in you .po, and it’s in a “um-field-error”-Message, so I guess it does originate in UM. ๐
This issue has two sides: Password Reset and also User Registration, where an attempt to register with an email already registered will be rejected and user security is revealed with the message: “This email is already linked to an existing account”.
Registration with a duplicate email address should always be accepted with email activation where the email owner should have an alternative to reject the registration.
Read this article “Password reset email design best practices”:
https://postmarkapp.com/guides/password-reset-email-best-practices
You always send an email to the email address provided.
Your confirmation message displayed on the web page would simply say, โAn email has been sent to (provided email address) with further instructions.โ However, the content of that email changes based on whether a user exists with that email address:
If the user exists, you send your standard password reset email with a URL and instructions.
If the user doesnโt exist, you send a different email explaining that the user account was not found and suggesting that they try a different email address.Valid comments here also:
-
This reply was modified 4 years, 8 months ago by
missveronica.
-
This reply was modified 4 years, 8 months ago by
missveronica.
Well, yes, @missveronicatv , exactly! – But right now it shows a would-be attacker that s/he found a valid user-address. Which ain’t good. ๐
An alternative would be if the message can be adjusted by those who want to hide existing users, but for that to work, at least the class “um-field-error” must go, as it reveals that #evilhacker found a valid address.
You can change the error message with the “Say What?” plugin.
Original string:
We can't find an account registered with that address or username
Text domain:ultimate-member
Replacement string: Your error message without revealing the userhttps://wordpress.org/plugins/say-what/
-
This reply was modified 4 years, 8 months ago by
missveronica.
@missveronicatv – well, yes, but see above: the message still has either the “um-field-error”-class or, say “um-field-confirm”-class (my guess, I didn’t check) if the address does in fact exist.
Regardless of what the message says, it’ll be pretty obvious what’s been going on!
This code snippet removes the class names with “error”:
add_filter( "um_username_b_form_edit_field", "my_username_b_form_edit_field", 10, 2); function my_username_b_form_edit_field( $output, $set_mode ) { if( $set_mode == 'password' ) { $output = str_replace( array( 'um-field-error', 'um-error'), array( 'um-field', '' ), $output ); } return $output; }Install the code snippet in your child-theme functions.php file
or use the “Code Snippets” pluginNext version of UM will have a new option to fix this issue.
Hide the existence of an e-mail address when resetting a passwordhttps://github.com/ultimatemember/ultimatemember/pull/927
-
This reply was modified 4 years, 8 months ago by
missveronica.
@missveronicatv – that’s awesome news, thanks!
Do you have a rough estimate re ETA? – I mean: are we talking days, weeks, nightmare before christmas, … ๐
Thanks in advance!
nils
Thanks for letting us know. I’m marking this as resolved now.
Regards,
Mh, 2.3 is out, but the feature is not? That’s a delay, or a cancelation? ๐
Hi @nils235
It has been added to 2.3.0. Please check the wordings after the update. Did you update the password-reset.php template as well?
Regards,
I looked in the settings:
On Github it says “By default this is disabled, so the behaviour will remain consistent for existing users, but a setting has been added to the ‘Access’ > ‘Other’ section of the settings page to allow it to be switched on.”But there’s no such option anywhere..?
-
This reply was modified 4 years, 8 months ago by
The topic ‘Security: wrong login reveals registered users’ is closed to new replies.