Users primary email is leaked through merge request "external status check"
GitLab's external status check feature sent the primary email address of merge request assignees and reviewers to an attacker-controlled server. An attacker could create a project, invite a victim, assign them to a merge request, and capture their private email.
GitLab
Originally disclosed on GitLab
- Fixed in under an hour
- Disclosed after under an hour
HackerOne report #1342036 by joaxcar on 2021-09-16, assigned to @ngeorge1:
Report | Attachments | How To Reproduce
Report
Summary
Hi GitLab team,
I found a way to leak any user's primary email from gitlab.com (or from self hosted ultimate instances).
The information about users added as assignee or reviewer to a merge request in a project with an "external status check" is containing primary emails. An attacker can abuse this by simply creating a project, invite anyone as a member of the project, and put the user as an assignee of a merge request.
The feature "status check" is only available for Ultimate license. This does not restrict the usage of this vulnerability, as Ultimate trial license is easily generated on GitLab.com. Anyone can create an account on Gitlab.com and then sign up for a trial license, so the required privileges should be considered as none in this case.
Steps to reproduce
- Make sure to have a way to capture requests from the gitlab instance. I used the webpage https://webhook.site which lets you generate a temporary web address where any requests will be captured and displayed in the page.

- Create an account on gitlab.com (or on an instance with ultimate license) and log in
- If on Gitlab.com: sign up for an Ultimate license (https://gitlab.com/-/trials/new)

- Create a project
attacker_projectby going to https://gitlab.com/projects/new#blank_project - Go to projects settings on https://gitlab.com/<USERNAME>/attacker_project/edit and scroll down to and expand "Merge request"
- Scroll down to "Status checks" and click "Add status check"

- Put your server as "Api to check" and name it something. Click "Add status check"

- Go to https://gitlab.com/<USERNAME>/attacker_project/-/project_members and invite any user as a victim
- Go to https://gitlab.com/<USERNAME>/attacker_project/-/branches/new and create a branch
new - Directly click on "Create merge request" (which will appear on the screen)
- Add the victim as an assignee and then click "Create merge request"

- Go and look at your server and there should be a request with a lot of information. And in this JSON the assignee is listed with primary email

Impact
A user can extract any other users private email which should not be visible
What is the current bug behavior?
Information sent to external status check API contains primary email
What is the expected correct behavior?
There is no need to send the emails at all so they should not be included
Output of checks
This bug happens on GitLab.com
Impact
A user can extract any other users private email which should not be visible
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
How To Reproduce
Please add reproducibility information to this section:
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
A user can extract any other user's private email address, which should not be visible.
What the attacker needed
GitLab.com account; Ultimate trial license (free); Victim must be a project member; Attacker-controlled server to receive requests
The fix
The external status check payload should be changed to exclude email addresses, as there is no need to send them.
How it was found
- Create an account on GitLab.com and sign up for an Ultimate trial license.
- Create a new project and go to its settings, expand 'Merge request', and add a status check pointing to a server you control.
- Invite a victim user as a member of the project.
- Create a new branch and then create a merge request, adding the victim as an assignee.
- Check your server; the request contains the victim's primary email in the JSON payload.
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.
GitLab has a feature called 'external status check' that sends information about a merge request to a URL you specify. The bug was that this information included the private email address of users assigned to the merge request. An attacker could set up their own server, create a project, invite someone, assign them to a merge request, and receive that person's email.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.