Reporter can read branch names and pipeline details even when the Repository option is disabled in the project via GET /api/v4/projects/{id}/packages
HackerOne report #3183740 by iamgk808 on 2025-06-09, assigned to @katwu:
Report | Attachments | How To Reproduce
Report
Summary
Once the Repository option is disabled in a project, no one can view the project code, branches, merge requests, or CI/CD details. However, I found a way where an attacker can still read branch names and pipeline details even when the Repository option is disabled
Steps to reproduce
two users - victim, attacker
Victim steps:
-
Create a new group called
hackerone& apply GitLab Ultimate trial to it -
In the group, create a private project called
project-1 -
In the
fix-bug-reportbranch, create a file calledpackage.jsonand add the following content, ==also replace70651278with your project ID==
{
"name": "my-package",
"version": "1.0.0",
"publishConfig": {
"registry": "https://gitlab.com/api/v4/projects/70651278/packages/npm/"
}
}
- Create another file called
.gitlab-ci.yml
image: node:20
stages:
- publish
variables:
NODE_AUTH_TOKEN: "${CI_JOB_TOKEN}"
before_script:
- npm install
publish:
stage: publish
script:
- echo "//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
- npm publish
-
A pipeline will run & create a package in
deploy>Package registry& you can see the branch name & commit details
-
Then go to
settings>project permissions& turn off theRepositoryoption & save it
-
In
deploy>Package registry, as you can see, the branch name & commit details are hidden
-
Now go to the
project-1>memberssection & invite theattackeruser with thereporterrole
Attacker steps:
- go to
project-1& note the project id
- In this URL, change the
70651278- with your project ID
https://gitlab.com/api/v4/projects/70651278/packages
- The attacker can see the branch names and pipeline details
Impact
An attacker can read branch names and pipeline details even when the Repository option is disabled in the project
Examples
What is the current bug behavior?
An attacker can read branch names and pipeline details even when the Repository option is disabled in the project
What is the expected correct behavior?
No one should be able to read the Repository contents
Relevant logs and/or screenshots
Output of checks
Impact
An attacker can read branch names and pipeline details even when the Repository option is disabled in the project
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
How To Reproduce
Please add reproducibility information to this section:









