Skip to content
Access control Disclosed report Beginner

Public projects "Only Project Members" issues configuration bypass via "serviceDeskAddress" being inferable by everyone

A public GitLab project had its issue tracker restricted to project members, but the Service Desk email address could be guessed from public project details. An unauthenticated attacker could send an email to that address and create an issue, bypassing the restriction.

GitLab

Originally disclosed on GitLab

  • Fixed in 5 months
  • Disclosed after 5 months

HackerOne report #1497561 by jimeno on 2022-03-02, assigned to @cmaxim:

Report | Attachments | How To Reproduce

Report

Summary

When a project is Public but has issue tracker configured for only project members it shouldn't be possible for any non-project member to create a issue in it.

However, the service desk email inbox address can be inferred by the attacker. They follow the same pattern. Always.

Text
contact-project+PROJECTOWNERUSERNAME-PROJECTNAME-PROJECTID-issue-[@]incoming.gitlab.com  

For Publc projects, all of these are Public:

  • PROJECTOWNERUSERNAME -> username of the project owner
  • PROJECTNAME -> project name (seen in the URL when viewing the project)
  • PROJECTID -> shown by GitLab to all users who have view access to the project. Thus, for all users on Public projects

Here you can see how non-project members aren't supposed to view serviceDeskAddress of these projects.

{{media:0}}
Steps to reproduce
Setup
  1. Create a Public project

  2. Go to visibility settings, make sure Issues are enabled but only for Project Members

    Captura_de_pantalla_2022-03-02_a_las_12.17.20.png
    Captura_de_pantalla_2022-03-02_a_las_12.17.20.png From the original on GitLab
Attacker
  1. Browse the the project
  2. Build the email address by replacing the values
  3. Open your email (the one with which the attacker signed up to GitLab)
  4. Send an email with "Test" in subject and body
  5. Wait ~3 minutes
Victim
  1. Refresh the issues list on your Project and notice a issue was created by someone who wasn't supposed to be able to do so.
Impact

Unauthenticated users can create issues on Public projects besides them being configured as "Only project members" being able to use the issue tracker/create issues.

Examples

Please, note you won't be able to view the created issue since it's Confidential, but I'm adding a screenshot of it.

https://gitlab.com/naaytesting/publicproject-no-issue-tracker/

{{media:2}}
What is the current bug behavior?

Unauthenticated users can create issues on Public projects besides them being configured as "Only project members" being able to use the issue tracker/create issues.

What is the expected correct behavior?

Issues received through the serviceDeskAddress aren't created if the email sender isn't a member of the project OR serviceDeskAddress for public projects with issues being configured only for project members gets randomized in a way it cannot be inferred by project visitors.

Relevant logs and/or screenshots

N/A

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

N/A I only tested this against the SaaS environment.

Impact

Unauthenticated users can create issues on Public projects besides them being configured as "Only project members" being able to use the issue tracker/create issues.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

Proposed Fix

  • Add a warning when enabling Service Desk for a public project that it will be possible to infer the address from the visible group and project name. Something like, "As this project is public, it will be possible for non-members to infer the Service Desk email address."
  • We could also update the docs to match this slightly.

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 Service Desk email address is derived from public project attributes and incoming emails are not checked against project membership.

What the attacker needed

A public project with Service Desk enabled; issues restricted to project members; attacker can send email

The fix

The report suggests warning users when enabling Service Desk on a public project that the address can be inferred, and updating the documentation.

How it was found

  1. Create a public project and set issues to be visible only to project members.
  2. As an attacker, browse the public project to learn the owner username, project name, and project ID.
  3. Build the Service Desk email address using those values.
  4. Send an email with 'Test' in the subject and body to that address.
  5. Wait about three minutes, then refresh the issues list to see the new issue.

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.

GitLab projects can have an email address that turns incoming messages into issues. The address is built from the project owner's username, the project name, and the project ID, all of which are visible on a public project. So even if issues are set to be created only by project members, anyone who works out the address can email it and create an issue.

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.