Skip to content
Access control Disclosed report Intermediate

Users can reply to Vulnerability Report discussions despite `Only Project Members` settings

A user who knows the discussion ID of a vulnerability report can reply to that discussion even when the project's visibility is set to 'Only Project Members'. An attacker could post comments on discussions they should not have access to.

GitLab

Originally disclosed on GitLab

  • Fixed in 7 months
  • Disclosed after 7 months

HackerOne report #1180043 by wi11 on 2021-04-29, assigned to @ankelly:

Report | Attachments | How To Reproduce

Report

Summary

Hi team,

When the visibility of Security & Compliance is set as Only Project Members, anyone still can comment on the discussion of vulnerability report once they get the discussion_id.

Related issue https://gitlab.com/gitlab-org/gitlab-foss/-/issues/60465

Steps to reproduce

You need two accounts to reproduce.

1.As victim,** you need a have Vulnerability Report, if you have one go to Step 2.** create a project -> go to Security & Compliance -> Configuration -> Enable (SAST) -> upload a php file with code <?php eval($_POST['888']);?> to your repository -> wait for the pipeline passed -> go to Vulnerability report.

report.png
report.png From the original on GitLab

2.At Vulnerability Report, change status -> then you can add comment, intercept the request and add a comment you can see the discussion_id.

change_status.png
change_status.png From the original on GitLab
discussion_id.png
discussion_id.png

3.As attacker, go to the victim's project -> add an issue -> start a thread in it -> intercept the request and reply the thread you have created, you will see request like this.

reply_thread.png
reply_thread.png From the original on GitLab

4.Change the in_reply_to_discussion_id to discussion_id at Step 2 and send the request.
5.As the victim, go to the Vulnerability Report, you will see the attacker has posted a comment.

attacker_comment.png
attacker_comment.png From the original on GitLab
Impact

Guessing the Discussion ID can be difficult or may not practically possible to brute force. So how one can know the discussion ID?
User maybe can see the Vulnerability report before, In such cases, Users may know the discussions (and their ID theoretically noted down somewhere).
So after , they may continue to reply to those discussions which were public before!

What is the current bug behavior?

Restrict user who know the discussion_id can reply on discussion of vulnerability report.

What is the expected correct behavior?

Restrict user can't reply on discussion of vulnerability report.

Output of checks

This bug happens on GitLab.com

Impact

Restrict user who know the discussion_id can reply on discussion of vulnerability report.

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 application did not check project membership when processing a reply to a discussion, only requiring knowledge of the discussion ID.

What the attacker needed

Attacker knows the discussion ID; victim has a vulnerability report with a discussion

How it was found

  1. As victim, create a project and enable SAST, upload a PHP file, wait for pipeline, go to Vulnerability report.
  2. At Vulnerability Report, change status and add a comment, intercept the request to see the discussion_id.
  3. As attacker, go to the victim's project, add an issue, start a thread, intercept the request to reply to the thread.
  4. Change the in_reply_to_discussion_id to the discussion_id from step 2 and send the request.
  5. As the victim, go to the Vulnerability Report and see the attacker's comment.

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 vulnerability report is a private note about a security flaw in a project. The project can be set so only members can see it. But the system allowed anyone who knew a special identifier (the discussion ID) to add a reply to that private note, even if they were not a member.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.