Skip to content
Info disclosure Disclosed report Beginner

Guest User Able to View SHA of Releases in Private Projects

A guest user in a private GitLab project could access the releases.json endpoint and see the tag name and commit SHA of releases, even though guests are not supposed to view those details. This exposed sensitive information about private project releases.

GitLab

Originally disclosed on GitLab

  • Fixed in 2.4 years
  • Disclosed after 2.4 years

HackerOne report #764761 by rafiem on 2019-12-26, assigned to @estrike:

Hi Team, i have found information disclosure in private projects. When user is invited as guest in private projects, user able to get the release information of the projects, but guest user cannot view the tag name and SHA of the commit in the release page or API. Recent update of gitlab (12.6), there is a feature to filter merge requests and issue based on releases. Turns out the endpoint to get the release name exposed the tag name and SHA to the guest user of private projects.

Proof of Concept

1.) User A create a private projects
2.) User A then create example tag/release in the project
3.) User A invite User B as Guest User to the project
4.) User B then access the releases.json endpoint, in this case : https://gitlab.com/jumbre/jumsol/-/releases.json
5.) User B get this following response, which is exposing tag name and SHA commit used in the release (in Guest Role)

JSON
[
  {  
    "id": 1160330,  
    "tag": "xzc",  
    "description": "asd",  
    "project_id": 16040312,  
    "created_at": "2019-12-26T13:29:21.376Z",  
    "updated_at": "2019-12-26T13:29:21.376Z",  
    "author_id": 4887622,  
    "name": "xzc",  
    "sha": "51d3c429cc21be061a460ab8823e1e8e6be8cd04",  
    "released_at": "2019-12-26T13:29:21.373Z"  
  },  
  {  
    "id": 1160327,  
    "tag": "xxx",  
    "description": "asdasd",  
    "project_id": 16040312,  
    "created_at": "2019-12-26T13:27:37.059Z",  
    "updated_at": "2019-12-26T13:27:37.059Z",  
    "author_id": 4887622,  
    "name": "xxx",  
    "sha": "51d3c429cc21be061a460ab8823e1e8e6be8cd04",  
    "released_at": "2019-12-26T13:27:37.055Z"  
  }  
]

History

It seems this vulnerability was introduced by !18761 (merged). It doesn't filter out release properties by user permission. Actually, we had exactly the same issue gitlab-foss#56402 (closed) in the past. We fixed the vulnerable API but seems the above MR introduced a new endpoint to expose release entries without proper permission check.

Impact

Exposed SHA commit of private projects to guest user

Best Regards,
[@]rafiem

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 new releases endpoint did not filter release properties based on the user's permission, so it returned tag and SHA data to guests.

Impact

A guest user could view the SHA commit of private projects, which they should not be able to see.

What the attacker needed

A private project; a guest user invited to the project; at least one release in the project

How it was found

  1. User A creates a private project.
  2. User A creates an example tag/release in the project.
  3. User A invites User B as a Guest User to the project.
  4. User B accesses the releases.json endpoint.
  5. User B receives a response exposing the tag name and SHA commit used in the release.

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.

In GitLab, a guest is a low-permission user who can see some project information but not everything. The releases.json endpoint returned extra data (tag names and commit SHAs) that guests should not see, so a guest could learn about private releases.

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.