Un-verified email in bio field can look like it is a verified email
HackerOne report #996526 by xenx on 2020-10-02, assigned to @ngeorge1:
Report | Attachments | How To Reproduce
Report
Summary
In gitlab , an unverified email id of an account can't be displayed publicly through Public email option it just gives an error like public email is not an email you own which is definitely understandable (since a unverified user can get into a private project by impersonating)
Case1: For a verified user, the public profile look like this when public email is enabled
Case2: But the Public email option for a unverified email can be bypassed to show the email publicly using the bio. Updating the bio with the unverified email look like this
So by using this an attacker can bypass the public profile option for a unverified email id(See both case1 and case2 is same) and get into a private project by impersonating through invitation or by requesting access.
Steps to reproduce
- Create an account but don't verify it.
2)Go to https://gitlab.com/profile and try to make the email display as public - You will see
public email is not an email you own - Now the update the bio with the email . You will see the profile looks just same to same like a verified email with
mailto:.
What is the current bug behavior?
Actually when bio is updated mailto: is added to email link ,hence it acts just like a publicly displayed verified email
What is the expected correct behavior?
In bio , mailto: should not included. Also it would be better if unverified email can't be searchable through project member invitation.
PS
I added the account with ==[@]gitlab.com== just to show how a malicious user can use [@]domain.com to impersonate to get into a target private project.
Impact
A malicious user can bypass the inability to display the unverified email publicly through public email option and improve the odds of a social engineering attack/infiltration being successful.
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
Problem to solve
Currently the "bio" field allows users to enter emails in multiple ways that look like "verified" emails when displayed.
Proposals considered
- Prohibit email addresses in the bio field. Problematic because a migration is required and it will partially delete user input data, neither of which we want to do. Would only impact approximately 0.05% of SaaS Users, based on a sample of 100K users.
- Add a "Bio" prefix when displaying. Problematic because the user can enter a line break then "Verified email: [EMAIL]".
- Display raw
bio_html(usinghtml_escape). Problematic because this "breaks" the display of any bios that include HTML or Markdown.
Proposal
TBD
Related links
- Markdown parsing for
biowas introduced in !35604 (merged)



