Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Email enumeration #4021

Closed
4 tasks done
Nutomic opened this issue Oct 5, 2023 · 4 comments
Closed
4 tasks done

[Bug]: Email enumeration #4021

Nutomic opened this issue Oct 5, 2023 · 4 comments
Labels
area: security bug Something isn't working

Comments

@Nutomic
Copy link
Member

Nutomic commented Oct 5, 2023

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

An attacker can find out which emails are registered on a given Lemmy instance by using endpoints which return LemmyErrorType::EmailAlreadyExists (register and save settings). The solution:

The "clean" way I guess would be to just return "ok" always with a message of "an email has been sent to the new email to verify it) and to send two different emails, one saying "could not change email since another account already exists" and one saying "click here to verify your email".

I guess that might be too much effort for this change though. Email enumeration will happen though when lemmy gets popular enough and cause account takeovers for people that like to reuse passwords.

@lazynooblet
Copy link

Rather than send two emails, send a verification e-mail to a valid account, otherwise do nothing. The wording could then be "If an account with that e-mail exists, a verification mail has been sent".

@Nutomic
Copy link
Member Author

Nutomic commented Mar 14, 2024

We send error EmailAlreadyExists in two cases:

  • Changing email of an existing account. In this case we could simply do nothing and keep the old address.
  • Registering a new account. Here we have to give some indication why the signup is failing, so I dont see how else to handle it.

@dessalines
Copy link
Member

We can probably close this then, because with registration rate limits (I think its 3 / hour by default) , it'd take someone years for this attack.

@dessalines dessalines closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2024
@dullbananas
Copy link
Collaborator

We can probably close this then, because with registration rate limits (I think its 3 / hour by default) , it'd take someone years for this attack.

With some ipv6 addresses, someone could switch to different addresses on the same network and do up to 16 times more registrations than the maximum for each address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: security bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants