Leaking branch names of projects with confidential (private) Repository
A non-member could see the branch names of a project whose repository was restricted to project members, by viewing the project's issue page. Branch names can embed issue titles, so this leaked potentially sensitive information.
GitLab
Originally disclosed on GitLab
- Fixed in 4 months
- Disclosed after 4 months
⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.
HackerOne report #3214025 by weasterhacker on 2025-06-22, assigned to @katwu:
Report | Attachments | How To Reproduce
Report
Hi team,
this isssue similar to past gitlab issues -of disclosure of branch names of private (confidential repostory )
here list past branch names disclosure issue beacause - it helps to traige this issue fast
https://gitlab.com/gitlab-org/gitlab/-/issues/480509 (leak branch names of confidential repository)
https://gitlab.com/gitlab-org/gitlab/-/issues/508046 (Unauthorized access to reading branch names when Repository and all its assets are disabled in the project)
https://gitlab.com/gitlab-org/gitlab/-/issues/406844 (Ambiguous branch name exploitation )
now this is clear that disclosing branch names of confidential (private Repository) is valid security issue .
Here attacker (non member) view branch names of confidential repository of public projects
Steps to reproduce
As Owner
Create a project with the repository visibility set to Only Project Members
go to Settings > General > Visibility, project features, permissions > Repository and set it to Only Project Members
victim create a issue at victim project
victim navigate created issue >there is an option come for creating merge request >first it create branch > then it create merge request
finish creating merge request successfully >merge request created successfully
As Attacker-
directly navigate victim project branches - https://gitlab.com/groupm11/fuxxing/-/branches
Getting 404: Page not found (because repository set to be "only project members" confidential
now attacker navigate victim project issue page - https://gitlab.com/groupm11/fuxxing/-/issues?show=eyJpaWQiOiI1IiwiZnVsbF9wYXRoIjoiZ3JvdXBtMTEvZnV4eGluZyIsImlkIjoxNjkyNTU3NjV9
(for poc purpose you can also see branch names of my project confidential repository )
or go step by step - https://gitlab.com/groupm11/fuxxing/-/issues
Now you will see the branch names of confidential repository
Output of checks
This bug happens on GitLab.com
video poc -
Impact
Impact-
Branch names can contain sensitive information, especially when the default branch name template of all projects is %{id}-%{title}, therefore branches that address issues contain the title of the issues themself, which can be sensitive a lot of the time.
An example where the impact could be critical is gitlab-org/security/gitlab, as it has security-${title} as its branch name template (Luckily the project is private, so it's not vulnerable).
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
How To Reproduce
Please add reproducibility information to this section:
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 issue page rendered branch names from merge requests without checking whether the viewer was allowed to see the repository.
Impact
Branch names, which may contain sensitive issue titles, could be disclosed to non-members; the reporter notes a project with a security-related branch template would be at risk if it were public.
What the attacker needed
Project is public; repository set to Only Project Members; a merge request exists with a branch; attacker is a non-member
How it was found
- As owner, create a project and set repository visibility to Only Project Members.
- As victim, create an issue and use the option to create a merge request, which first creates a branch.
- As attacker, navigate directly to the project's branches page and get a 404.
- As attacker, navigate to the project's issues page and see the branch names.
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.
A project can hide its code repository so only its own members can see it. However, the issue tracker page still showed the names of branches that had been created, and branch names often include the title of the issue they relate to. So someone outside the project could learn what work was being done, even though the code itself was hidden.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.