Skip to content
Info disclosure Disclosed report Beginner

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
  1. 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.
webhook.png
webhook.png From the original on GitLab
  1. Create an account on gitlab.com (or on an instance with ultimate license) and log in
  2. If on Gitlab.com: sign up for an Ultimate license (https://gitlab.com/-/trials/new)
ultimate.png
ultimate.png From the original on GitLab
  1. Create a project attacker_project by going to https://gitlab.com/projects/new#blank_project
  2. Go to projects settings on https://gitlab.com/<USERNAME>/attacker_project/edit and scroll down to and expand "Merge request"
  3. Scroll down to "Status checks" and click "Add status check"
addcheck.png
addcheck.png From the original on GitLab
  1. Put your server as "Api to check" and name it something. Click "Add status check"
addserver.png
addserver.png From the original on GitLab
  1. Go to https://gitlab.com/<USERNAME>/attacker_project/-/project_members and invite any user as a victim
  2. Go to https://gitlab.com/<USERNAME>/attacker_project/-/branches/new and create a branch new
  3. Directly click on "Create merge request" (which will appear on the screen)
  4. Add the victim as an assignee and then click "Create merge request"
addassingee.png
addassingee.png From the original on GitLab
  1. 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
leak.png
leak.png From the original on GitLab
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:

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

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

  1. Create an account on GitLab.com and sign up for an Ultimate trial license.
  2. Create a new project and go to its settings, expand 'Merge request', and add a status check pointing to a server you control.
  3. Invite a victim user as a member of the project.
  4. Create a new branch and then create a merge request, adding the victim as an assignee.
  5. 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.

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.