Bypassing/ Business logic error of validating subscription path /-/subscriptions/validate_payment_method
The payment method validation endpoint accepted any user ID without checking ownership, letting an attacker bypass the subscription requirement and run CI/CD jobs without paying.
GitLab
Originally disclosed on GitLab
- Fixed in 7 months
- Disclosed after 7 months
⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.
HackerOne report #2028032 by zeb0x01 on 2023-06-15, assigned to @ottilia_westerlund:
Report | Attachments | How To Reproduce
Report
Summary
Hello Team, While pushing code to gitlab.com and building a gitlab pipeline. The servers wont run and gitlab would tell you to take a subscription which tells you to add a debit/credit card /payment method.
The way it is bypassed is there are no check for id and can be repeated for different users.
The Request looks like this
POST /-/subscriptions/validate_payment_method HTTP/1.1
Host: gitlab.com
{"id":"REDACTED","gitlab_user_id": REDACTED }
The POST request would simply take any user_id and validate them.
Steps to reproduce
- Create a new account on gitlab. Note the userID of your account.
- Try to run gitlab pipeline or cicd pipeline by uploading maybe a gitlab page.
- The job would fail It would tell you to verify yourself via adding a payment method on your account.
- Now the above path comes in play. Send the Post request changing to your gitlab_user_id.
- You will be able to run your jobs now :)
POC Video: Please have a look and watch the video till the end.
REDACTED
Impact
Bypassing authentication via idor and business logic error
Impact
Bypassing the subscription requirement and creating jobs on gitlab without subscription.
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
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 endpoint did not verify that the provided gitlab_user_id belonged to the authenticated user, allowing any user ID to be validated.
Impact
An attacker could bypass the subscription requirement and run CI/CD jobs on GitLab without a subscription.
What the attacker needed
A free GitLab account; ability to send a custom POST request
How it was found
- Create a new account on gitlab and note the userID.
- Try to run a gitlab pipeline or CI/CD pipeline.
- The job fails and asks to add a payment method.
- Send a POST request to the validate_payment_method path with your gitlab_user_id.
- You can now run your jobs.
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.
A website checks if you have paid using a number that identifies your account. The site did not check the number properly, so you could put in a number and the site would think you had paid, letting people run jobs without paying.
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.