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:
- Sign up a new account
- Wait for confirmation email
- Once received copy the link in the confirmation email (should contain confirmation_token URL parameter)
- Confirm the account by browsing to confirmation link
- Open an incognito window
- In incognito window paste the same confirmation link.
- 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

Impact
User emails may be leaked.
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
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
- Sign up a new account
- Wait for the confirmation email and copy the confirmation link
- Confirm the account by visiting the link
- Open an incognito window and visit the same link again
- 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.