Skip to content
Access control Disclosed report Intermediate

Attacker makes comments on private commits and private issues and other private areas also.

A user who had commented on public commits and issues could continue to add comments via email after the project was made internal, even though the web interface showed a not-found page. This allowed the attacker to comment on private commits and issues they should no longer access.

GitLab

Originally disclosed on GitLab

  • Fixed in 1 hour
  • Disclosed after 1 hour

HackerOne report #635744 by uzsunny on 2019-07-04, assigned to gitlab_cmaxim:

Reproduction steps:

This issue is similar to this one

https://hackerone.com/reports/502593

Create a public group and public project on gitlab.com

Now attacker will enable the group watch notifications for a group only.

for example

https://gitlab.com/your-test-group-name

group_watch_notifications.png
group_watch_notifications.png From the original on GitLab

Next attacker will create comments on public project commits which are created by the group.

Next attacker will create comments on public project issues which are created by the group.

Now victim changes the project visibility from public to internal.

make_project_internal.png
make_project_internal.png From the original on GitLab

Make the project issues and commits which are only accessible to the members of the project.

If the attacker tries to visit the commits link he may see not found page.

https://gitlab.com/hello-test-group/test-makers-high/commit/9510fe60d34e1f89e3cdeb9b8befa427c3acd332

commits_not_found.png
commits_not_found.png From the original on GitLab

But attacker will add comments via email by replying to his emails

when ever victim checks his private commits page the comments are added by the attacker.

comments_added_in_commits_by_attacker.png
comments_added_in_commits_by_attacker.png From the original on GitLab

Same thing if he visits issues and issues may not visible to the attacker and he will see 404 not found page.

https://gitlab.com/hello-test-group/test-makers-high/issues/2

issues_not_found.png
issues_not_found.png From the original on GitLab

But he will add issue comments and reply to discussions via email.

When ever victim checks issue page the comments are added by the attacker.

comments_and_discussions_added_in_issues_by_attacker.png
comments_and_discussions_added_in_issues_by_attacker.png From the original on GitLab

Where ever the discussions and comments are available in the internal project the attacker will add the comments.

Impact

Attacker will add the comments on issues and private commits by email which are not supposed to do.

Attacker will comment where ever the discussions are available in all areas of the internal project.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

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 email reply handler did not re-check the sender's current access to the project after its visibility changed.

Impact

An attacker could add comments to private commits and issues via email, even though they could not view them through the web interface.

What the attacker needed

A GitLab account; victim creates a public project; attacker comments before project becomes internal; victim changes project to internal

How it was found

  1. Create a public group and public project on gitlab.com.
  2. As the attacker, enable group watch notifications for the group.
  3. As the attacker, comment on public project commits and issues created by the group.
  4. As the victim, change the project visibility from public to internal.
  5. As the attacker, try to visit the commit or issue link and see a not-found page.
  6. As the attacker, reply to notification emails to add comments, which appear on the private commits and issues.

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.

When a project is public, anyone can comment on its commits and issues. If the project later becomes private, the system should stop accepting comments from people who are no longer allowed to see it. Here, the email reply feature still accepted comments from an outsider, so they could post on private content.

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.