SSRF patch for CI Lint API is incomplete
The CI Lint API in GitLab was vulnerable to SSRF even for unauthenticated users when external users were enabled, allowing them to make requests to internal resources. The patch for previous SSRF reports was incomplete, leaving this bypass.
GitLab
Originally disclosed on GitLab
- Fixed in 17 days
- Disclosed after 17 days
HackerOne report #1236965 by minhli on 2021-06-17, assigned to @dcouture:
Report | How To Reproduce
Report
Hi,
Prior reports:
Tested on version: 13.12.4-ee
There is at least one more case which I think is not covered in this patch in case of External users.
Considering following scenarios:
(note from @dcouture, I removed the first scenario it was not valid)
Second Scenario
- Sign ups are enabled
- Under
Account and limit, set
New users set to external
Newly registered users will by default be external
- As I noticed this in one of the organization and as the docs say:
In cases where it is desired that a user has access only to some internal or private projects, there is the option of creating External Users. This feature > may be useful when for example a contractor is working on a given project and should only have access to that project.
External users:
Can only create projects (including forks), subgroups, and snippets within the top-level group to which they belong.
Right after signup, now no user can really do any action unless they are explicitly added to a group or project by the admins. So no SSRF should be possible, but by abusing the CI Lint API, in such a case any unauthenticated user can still abuse CI Lint API for SSRF. This option is really valuable with contractors and for open source projects where collaborators can use any email address to sign-up but usually manual account reviews, group/project assignments are done by maintainers.
I am not sure if these cases have been overlooked, so filing this report to ensure this is known. In both these cases I think unauthenticated SSRF should not be possible by just anyone.
Please review.
Thanks!
Impact
Information disclosure
protection bypass
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
Root cause
Likely the CI Lint API did not properly restrict requests to internal resources, and the previous patch did not account for the external user configuration.
Impact
An unauthenticated attacker could perform SSRF, leading to information disclosure and bypassing protection.
What the attacker needed
Sign ups enabled; new users set to external
How it was found
- Enable sign ups
- Set new users to external under Account and limit
- As an unauthenticated user, abuse the CI Lint API to perform SSRF
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.
SSRF (Server-Side Request Forgery) is when an attacker tricks a server into making requests to internal systems that the attacker cannot reach directly. Here, the CI Lint API feature could be abused to send requests to internal addresses, even by users who are not logged in, if external users are enabled.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.