DoS on Chatops users
An attacker could link their own GitLab account to a victim's Slack user ID via the Mattermost slash commands integration, preventing the victim from using ChatOps or unlinking the attacker's account. This results in a targeted denial of service for the victim's Slack ChatOps functionality.
GitLab
Originally disclosed on GitLab
- Fixed in 27 hours
- Disclosed after 27 hours
⚠️ 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 #2638024 by pwnie on 2024-08-04, assigned to GitLab Team:
Report | How To Reproduce
Report
Summary
While looking for pipeline vulnerabilities I accidentally discovered a way to make it impossible for targeted Slack users to use Chatops functionality, either Gitlab for Slack app or slash commands integration.
Not that critical, I think... but technically worth reporting.
Steps to reproduce
- Create a project on GItlab.com
- Go to settings and integrations, find Mattermost slash notification integration and click configure
- Activate it and set the token to "hackerone"
- Copy the Request URL
- Go to a command line and do the following:
curl https://gitlab.com/api/v4/projects/YOUR_PROJECT_ID/integrations/mattermost_slash_commands/trigger -d "token=hackerone&user_id=TARGET_SLACK_ID&team_id=TARGET_SLACK_TEAM_ID&response_url=example.com&command=/gitlab&text=test&user_name=Gitlab.com&team_domain=Gitlab.com"
- Open the URL in the response (example:
Hi there! Before I do anything for you, please \u003chttps://gitlab.com/-/profile/chat_names/new?token=B8mxwpUMxsEpnv5pq5J49Eye6prYiV9t-asdfadsf|connect your GitLab account)
8. Approve it
9. Go to https://gitlab.com/-/profile/chat_names and observe you have the account linked
10. Whenever the targeted slack user attempts to use any chatops functionality, they will not be able to log in nor remove your account from their slack account
11. You can test this on your own slack account by simply copying your team id in the url of the workspace and copying your user id
Click on your profile picture.
Click "View full profile"
Click on "more" and click "Copy member ID"
Impact
Targeted DoS for chatops.
Components affected
Gitlab and Slack users
Impact
Targeted DoS for chatops.
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 Mattermost slash commands integration does not verify that the user initiating the linking process actually controls the Slack user ID being linked, allowing an attacker to link their GitLab account to any Slack user ID.
Impact
The targeted Slack user cannot use any ChatOps functionality and cannot remove the attacker's linked account, resulting in a targeted denial of service.
What the attacker needed
Attacker has a GitLab account; Attacker knows victim's Slack user ID and team ID; Victim uses GitLab ChatOps with Slack
How it was found
- Create a project on GitLab.com
- Go to settings and integrations, find Mattermost slash notification integration and click configure
- Activate it and set the token to "hackerone"
- Copy the Request URL
- Send a crafted request to the trigger endpoint with the victim's Slack user ID and team ID
- Open the URL from the response and approve it to link the attacker's GitLab account to the victim's Slack user
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.
This report shows how an attacker can hijack a victim's Slack connection to GitLab by tricking the system into linking the attacker's GitLab account to the victim's Slack user ID. Once linked, the victim cannot use GitLab's ChatOps features or remove the attacker's account, effectively locking them out. It's like someone else registering your phone number for a service so you can't use it.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.