Skip to content
Account takeover Disclosed report Intermediate

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

  1. Hacker aims victim's email address that not registered on gitlab.com yet
  2. Hacker register the victim's email address ([email protected])
  3. Hacker logged in into gitlab.com with victim's email address
  4. Go to https://gitlab.com/profile to change the victim's email to hacker's email ([email protected])
  5. Hacker receive link confirmation on email (on [email protected])
  6. Done. Now victim want to register [email protected] to gitlab and fail. So victim reset his password using forget password feature.
  7. Then victim can login successfully after reset his password
  8. When attacker know it, attacker visit the link on 5th step and change the email to [email protected] again
  9. Attacker reset the password
  10. Attacker can login successfully and repeat 4th step again with another attacker's email address

Suggestion:

  1. please add "cancel" option after an user change the email address
  2. prevent user to login before confirm the email address
  3. 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!

The original report as published on GitLab. Images and videos are our own copies; raw HTML is shown as text. View it on GitLab.

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

  1. Attacker registers the victim's unregistered email address on GitLab.
  2. Attacker logs in and changes the email to their own, receiving a confirmation link.
  3. Victim later registers, fails, resets password, and logs in.
  4. Attacker reuses the old confirmation link to change the email back to their own.
  5. 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.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.