Skip to content
Info disclosure Disclosed report Beginner

User emails are leaked from expired confirmation tokens

Expired confirmation tokens on GitLab returned the associated user's email address in an error message. An attacker could collect such tokens from public URL caches and use them to disclose user emails.

GitLab

Originally disclosed on GitLab

  • Fixed in 14 months
  • Disclosed after 14 months

HackerOne report #777788 by izzsec on 2020-01-19, assigned to @cmaxim:

Summary

User emails are leaked from expired confirmation tokens

Steps to reproduce

Using your own user on gitlab.com:

  1. Sign up a new account
  2. Wait for confirmation email
  3. Once received copy the link in the confirmation email (should contain confirmation_token URL parameter)
  4. Confirm the account by browsing to confirmation link
  5. Open an incognito window
  6. In incognito window paste the same confirmation link.
  7. Error will be returned
1 error prohibited this user from being saved  
* Email was already confirmed, please try signing in  

Victim user email will also be displayed

An attacker can use public URL caching services such as wayback machine to gather confirmation_tokens.

For example the following were gathered from the gau tool at https://github.com/lc/hacks/tree/master/getallurls

Each will display a user email:

https://gitlab.com/users/confirmation?confirmation_token=FYHzvkso2h_2kTMb_1RB  
https://gitlab.com/users/confirmation?confirmation_token=B2QqhVoYUFd6BC9R7zx6  
https://gitlab.com/users/confirmation?confirmation_token=YGM9zP7sXXV89TQBUwME  
https://gitlab.com/users/confirmation?confirmation_token=1RTLKe5satLvADuRvknt  
https://gitlab.com/users/confirmation?confirmation_token=1cNzS8zxYh5skNRoNn7T  
https://gitlab.com/users/confirmation?confirmation_token=mxNo5CkPny6PMJ3HgJWK  
https://gitlab.com/users/confirmation?confirmation_token=tptcViR66fY9SUjNUqy4  
https://gitlab.com/users/confirmation?confirmation_token=ttLR43YCjtSizuSVXzVh  
https://gitlab.com/users/confirmation?confirmation_token=yQ_nWUfUgaKzuays5xe3  
https://gitlab.com/users/confirmation?confirmation_token=W4PQ6ZpwWT5VUzzLJ_2M  
https://gitlab.com/users/confirmation?confirmation_token=uPtqoLpao3k9zsQsuxBg  
https://gitlab.com/users/confirmation?confirmation_token=sPKW5ZUqYymdTqDfvCvg  
https://gitlab.com/users/confirmation?confirmation_token=6Fr726cFqpVbydzhc52s  
https://gitlab.com/users/confirmation?confirmation_token=6yBwH4_5Ay5Td2f98pxz  

Impact

User emails may be leaked.

What is the current bug behavior?

Expired confirmation tokens return user email.

What is the expected correct behavior?

Expired confirmation token should just return generic error without disclosing user email.

Relevant logs and/or screenshots

Example screenshot

gitlab-user-confirmation-token-email
gitlab-user-confirmation-token-email From the original on GitLab

Impact

User emails may be leaked.

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

Impact

User emails may be leaked, including for users whose tokens were captured by public URL caching services.

What the attacker needed

A confirmation token, possibly from public caches

The fix

Expired confirmation tokens should return a generic error without disclosing the user's email.

How it was found

  1. Sign up a new account
  2. Wait for the confirmation email and copy the confirmation link
  3. Confirm the account by visiting the link
  4. Open an incognito window and visit the same link again
  5. Observe the error message containing the user's email

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 sign up, a website sends a link with a secret code to confirm your email. If that code is old or already used, the site should just say 'invalid link'. Here, it showed the email address that the code belonged to, so anyone who found old codes in public archives could learn people's email addresses.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.