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
- As a owner in public project, set your repository to
Only Project members - Now go to
https://gitlab.com/<UserName>/<ProjectName>/-/settings/repository-->Mirroring repositories - Add the git url from github private project and set
Mirror directionasPull - 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.

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!
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
- As an owner in a public project, set the repository visibility to 'Only Project members'.
- Go to the repository settings and open 'Mirroring repositories'.
- Add a Git URL from a private GitHub project and set the mirror direction to 'Pull'.
- Log in as a non-member and visit the project details page.
- 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.