Skip to content
Access control Disclosed report Intermediate

Ability to gain access to private project through an email invite by using other user's email address as an unverified secondary email

GitLab matched project invitations to unverified secondary email addresses, allowing an attacker to add a victim's email to their own account and receive the invitation. The attacker could then access private projects and impersonate a legitimate member.

GitLab

Originally disclosed on GitLab

  • Fixed in 4 months
  • Disclosed after 4 months

HackerOne report #1517554 by vaib25vicky on 2022-03-21, assigned to @rshambhuni:

Report | How To Reproduce

Report

Description

Member invitation by email address is vulnerable and allows user impersonation. When project admin invites a new member via email then Gitlab code match it with unverified email of different account. This gives an opportunity to an attacker to add legitimate member email address to his account and gain access to the private project.

Attack Scenario

Suppose there is company name xyz.org, all projects of this company are only accessible to its employees, that is those Gitlab accounts that have email addresses that match <employee_name>[@]xyz.org.
Attacker can add email address [email protected] to his personal Gitlab account which is an unverified email address and then all invitation to the [email protected] are actually goes to the attacker and he gains access to the private projects of the company.

PoC

Attacker account
  • Attacker has a verified primary email address which he owns
  • He adds another email address of the company employee [email protected] in his account .

This will be an unverified secondary email address

Victim account
  • Creates a project named Gitlab-Bounty
  • Invites member to the project by email address [email protected]
Bug
  • Gitlab will not check whether email address is verified or not and incorrectly matches the invitation to the attacker account.
  • Attacker successfully managed to impersonate a legitimate employee of the company and gain access to the private project and repository
Output of checks

This bug happens on GitLab.com. Probably instance too (please check)

Impact

Gitlab don't check verified email address prior to matching them with Gitlab accounts and this allows an attacker to gain access to private projects with higher permissions and impersonate legitimate members of the project.

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

Root cause

Likely the invitation system matched email addresses to accounts without first checking that the email address was verified.

Impact

An attacker could gain access to private projects with higher permissions and impersonate legitimate members.

What the attacker needed

Attacker has a GitLab account; Attacker knows a victim's email address; Victim invites that email to a project

How it was found

  1. Attacker adds the victim's email address as an unverified secondary email on their own account.
  2. Victim creates a project and invites a member using that email address.
  3. GitLab matches the invitation to the attacker's account without verifying the email.
  4. Attacker gains access to the private project and repository.

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 invite someone to a project by email, the system should only send the invite to the person who actually owns that email address. Here, GitLab let an attacker add someone else's email to their own account without proving they owned it, so the invite went to the attacker instead. This let the attacker see private project data.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.