Skip to content
Info disclosure Disclosed report Beginner

Group integration discord settings sensitive information exposed to project maintainers

The Discord integration settings for a group, including webhook URLs, were exposed through the API to project maintainers who should not have access. An attacker with maintainer access could retrieve the webhook URLs and use them to send arbitrary messages to the Discord channels.

GitLab

Originally disclosed on GitLab

  • Fixed in 30 days
  • Disclosed after 30 days

⚠️ 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 #2092521 by vaib25vicky on 2023-08-01, assigned to GitLab Team:

Report | Attachments | How To Reproduce

Report

Hi

A new feature is added https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125621 which Allow to set different webhooks on events in Discord Integration. This new additions webhooks url are getting leaked in API responses.

In the past similar bugs are reported where webhook urls are leaked. For example, https://gitlab.com/gitlab-org/gitlab/-/issues/385669 and https://gitlab.com/gitlab-org/gitlab/-/issues/36632

Steps to reproduce
  1. Group owner set-up Discord integration at group level by going over https://gitlab.com/groups/<group-name>/-/settings/integrations/discord/edit

Owner also setups different webhooks on events.

Screenshot_2023-08-01_205210.png
Screenshot_2023-08-01_205210.png From the original on GitLab
  1. Lets suppose there's a project inside the group and there exists a maintainer named foo
  2. foo uses the integration api and gain access to group owner Discord webhook url
Bash
curl --request GET \  
  --url https://gitlab.com/api/v4/projects/<PROJECT-ID>/integrations/discord \  
  --header 'Content-Type: application/json' \  
  --header 'PRIVATE-TOKEN: <USER-ACCESS-TOKEN>' 

Output of checks

This bug happens on GitLab.com

Impact

The webhook urls allow accessing and sending customs message in the channels in discord without any authentication. If they are leaked to unauthorized user then he/she can send arbitrary messages and depending upon the configuration can use this same bug to run commands in the channels.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

The original report as published on GitLab. Images and videos are our own copies; raw HTML is shown as text. View it on GitLab.

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 API endpoint for project integrations did not properly restrict access to group-level integration settings, allowing project maintainers to read sensitive webhook URLs.

Impact

The leaked webhook URLs could allow an unauthorised user to send arbitrary messages to the Discord channels and, depending on configuration, run commands in the channels.

What the attacker needed

A GitLab group with Discord integration; a project maintainer account in the group

How it was found

  1. A group owner sets up the Discord integration at the group level and configures different webhooks for events.
  2. A project maintainer named foo exists within the group.
  3. foo uses the integration API to retrieve the group owner's Discord webhook URL.

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 webhook URL is a secret link that lets a service post messages into a chat channel. Here, a project maintainer could use the GitLab API to read the group's Discord webhook URLs, which they should not be able to see. With those URLs, they could post any message into the connected Discord channels.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.