IDOR in getting project template lists of other users
The endpoint that lists available project templates for a user did not check whether the requester was that user, so changing the username in the request returned another user's private templates. An attacker could view the names and details of other users' project templates.
GitLab
Originally disclosed on GitLab
- Fixed in 25 hours
- Disclosed after 25 hours
HackerOne report #750636 by ashish_r_padelkar on 2019-12-03, assigned to @dcouture:
Summary
Hello,
When you create a project using template, there is a tab Instance

When you click on it, it send the request like below
GET /users/guest1/available_project_templates HTTP/1.1
Host: mygitserver.in
Accept: */*
X-CSRF-Token: 1
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
Referer: http://mygitserver.in/projects/new
Accept-Encoding: gzip, deflate
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie:1
Connection: close
and you will see the list of project template available for yourself.
Using this request, you can also see the available templates for other users too (private) by just changing the username in the request.
GET /users/<Change The UserName>/available_project_templates HTTP/1.1
Steps to reproduce
- Go to create project using
Create from Templateoption - Click on
Instancetab and capture the request shown above. - Just change the username of admin in the instance for eg
GET /users/<Change The UserName>/available_project_templates HTTP/1.1 - The response will show you all available templates for admin despite you dont have permission to see any of it.
What is the current bug behavior?
Shows available project templates of other users
What is the expected correct behavior?
Only project template belongs to you should be displayed
Output of checks
Tested on 12.5.2-ee
Regards,
Ashish
Impact
Users able to see project templates of other users IDOR
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
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 endpoint authorised the request based on the username in the URL rather than verifying that the authenticated user matched that username.
Impact
An authenticated user could see the private project templates of any other user, including administrators.
What the attacker needed
A logged-in account; ability to send a modified request
How it was found
- Go to create a project using the 'Create from Template' option.
- Click on the 'Instance' tab and capture the request shown.
- Change the username in the request to another user, such as admin.
- Observe that the response lists that user's available templates.
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.
When you create a project from a template, the website asks the server for a list of templates that belong to you. The server used the username in the web address to decide whose list to return, but it never checked that you were that user. So anyone could put a different username in the address and see that person's private template list.
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.