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

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 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

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.

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

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.

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!
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
- Create a public group and public project on gitlab.com.
- As the attacker, enable group watch notifications for the group.
- As the attacker, comment on public project commits and issues created by the group.
- As the victim, change the project visibility from public to internal.
- As the attacker, try to visit the commit or issue link and see a not-found page.
- 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.