How This Easy Vulnerability Resulted In A 20 000 Bug Bounty From Gitlab
GitLab's project import feature failed to validate that issue IDs referenced in an imported project belonged to the importing user, allowing an attacker to import and access other users' issues. This could leak sensitive project information and enable sabotage of victim teams' infrastructure.
Web applications have so many different objects, and it’s important to be able to uniquely identify all of these through the use of primary keys. We typically consider numerical IDs to be a good identifier; for example, we could use unique 10-digit number for each user.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the import process trusted user-supplied foreign key IDs (such as issue_ids) without verifying ownership, allowing cross-project references.
Impact
This could leak sensitive project information such as cluster IDs and secret CI keys, and the stolen information could be used to sabotage victim teams' build/deploy pipelines or make content inaccessible.
What the attacker needed
A GitLab account; ability to create and import projects; knowledge of target issue IDs
The fix
The import process should validate that referenced issue IDs belong to the importing user before including them.
How it was found
- Create a project export file (project.json) with an empty issues array.
- Add an issue_ids array containing the numerical IDs of issues to steal.
- Import the crafted project into GitLab.
- The imported project now contains the referenced issues from other users.
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 write-up has not been written yet. The Original tab links to the source.
When you import a project into GitLab, the import file can list issue numbers to bring in. GitLab did not check whether those issues actually belonged to you, so you could pull in other people's private issues by guessing their numbers. This is called an insecure direct object reference (IDOR): the app uses a predictable identifier but forgets to check if you are allowed to access that object.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.