ESCALATED: Unexpired Confirmation Link of Change Email Address lead to Account Takeover
An unexpired email change confirmation link allowed an attacker to re-take over an account after the victim reset their password. The attacker could repeatedly change the victim's email and reset the password to gain access.
GitLab
Originally disclosed on GitLab
- Fixed in 3 months
- Disclosed after 3 months
HackerOne report #726256 by gnux on 2019-10-31, assigned to @jbroullon:
Summary
Hacker can do account takeover to every candidate customer
Steps to reproduce
- Hacker aims victim's email address that not registered on gitlab.com yet
- Hacker register the victim's email address ([email protected])
- Hacker logged in into gitlab.com with victim's email address
- Go to https://gitlab.com/profile to change the victim's email to hacker's email ([email protected])
- Hacker receive link confirmation on email (on [email protected])
- Done. Now victim want to register [email protected] to gitlab and fail. So victim reset his password using forget password feature.
- Then victim can login successfully after reset his password
- When attacker know it, attacker visit the link on 5th step and change the email to [email protected] again
- Attacker reset the password
- Attacker can login successfully and repeat 4th step again with another attacker's email address
Suggestion:
- please add "cancel" option after an user change the email address
- prevent user to login before confirm the email address
- make "change email" confirmation link expired after user reset the password
Thanks
Best regards,
gnux
Impact
Account take over
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the email change confirmation link does not expire and remains valid after a password reset, allowing reuse.
Impact
An attacker could take over a victim's account by reusing an unexpired email change confirmation link.
What the attacker needed
Victim's email not yet registered; attacker can register victim's email; attacker has a confirmation link
How it was found
- Attacker registers the victim's unregistered email address on GitLab.
- Attacker logs in and changes the email to their own, receiving a confirmation link.
- Victim later registers, fails, resets password, and logs in.
- Attacker reuses the old confirmation link to change the email back to their own.
- Attacker resets the password and logs in as the victim.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you change your email on a website, it sends a confirmation link to the new address. If that link never expires, someone who previously had access can use it later to take over your account again, even after you reset your password.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.