Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 52,674
    • Issues 52,674
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,547
    • Merge requests 1,547
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #356665
Closed
Open
Issue created Mar 23, 2022 by GitLab SecurityBot@gitlab-securitybotReporter

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

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 john@xyz.org to his personal Gitlab account which is an unverified email address and then all invitation to the john@xyz.org 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 john@gitlab-bounty.com 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 john@gitlab-bounty.com
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:

Edited Jun 06, 2022 by Bogdan Denkovych
Assignee
Assign to
Time tracking