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)

1.png

Case1: For a verified user, the public profile look like this when public email is enabled

2.png

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

3.png

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.

4.png.

Steps to reproduce
  1. Create an account but don't verify it.
    2)Go to https://gitlab.com/profile and try to make the email display as public
  2. You will see public email is not an email you own
  3. 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

Proposal

TBD

Edited by Dan Jensen