Skip to content
Info disclosure Disclosed report Beginner

mirrored url visible for users despite no access to repositories

A GitLab project's mirrored repository URL was shown on the project details page to users without repository access. An attacker could learn the URL of a private GitHub project or infer branch names and files from a public one.

GitLab

Originally disclosed on GitLab

  • Fixed in 6 months
  • Disclosed after 6 months

HackerOne report #708639 by ashish_r_padelkar on 2019-10-06, assigned to @ankelly:

Summary

Hello,

When the repository is mirrored from another repositories, the url of that repository is visible to users on project details page ,who doesn't have any access to repositories.

Steps to reproduce

  1. As a owner in public project, set your repository to Only Project members
  2. Now go to https://gitlab.com/<UserName>/<ProjectName>/-/settings/repository -->Mirroring repositories
  3. Add the git url from github private project and set Mirror direction as Pull
  4. Now login as non member and visit the project detail page at https://gitlab.com/<UserName>/<ProjectName> and you will see the url of the repository from which this repository is mirrored from despite no permission to see the repository.
Screenshot_2019-10-07_at_00.07.57.png
Screenshot_2019-10-07_at_00.07.57.png From the original on GitLab

What is the current bug behavior?

Mirrored URL visible to unauthorized users

What is the expected correct behavior?

Only users with access to gitlab repositories should see the mirrored url

Output of checks

This bug happens on GitLab.com

Regards,
Ashish

Impact

Mirrored URL can be from private github project . So, if Gitlab public project has github private project mirrored URL, unauthorized users will see the url of private project from github.

If the url is from public project of github, this gives them idea about the branch names and files in current gitlab project despite they dont see repository in gitlab .

This also happens in gitlab private project too where guest is able to see the mirrored URL.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

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 project details page did not check the viewer's repository permissions before displaying the mirror source URL.

Impact

Unauthorised users could see the URL of a private GitHub project or infer branch names and files from a public one; this also affected private GitLab projects where guests could see the mirrored URL.

What the attacker needed

A GitLab project with mirroring configured; a non-member or guest user viewing the project page

How it was found

  1. As an owner in a public project, set the repository visibility to 'Only Project members'.
  2. Go to the repository settings and open 'Mirroring repositories'.
  3. Add a Git URL from a private GitHub project and set the mirror direction to 'Pull'.
  4. Log in as a non-member and visit the project details page.
  5. Observe the mirrored repository URL displayed despite no permission to see the 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 a GitLab project is set to mirror another repository, the address of that source repository was displayed on the project's main page. Even people who were not allowed to see the project's code could see this address. That could reveal where the code comes from, such as a private GitHub project.

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.