Skip to content
Business logic Disclosed report Beginner

Logic flaw in project settings in the UI can render project exposing unwanted data

A logic flaw in GitLab's project visibility settings causes the UI to display 'Only project members' while saving 'Everyone with access' after toggling a feature off and on. This can unintentionally expose project data to unauthenticated users.

GitLab

Originally disclosed on GitLab

  • Fixed in 2 months
  • Disclosed after 2 months

HackerOne report #1456870 by joaxcar on 2022-01-21, assigned to @rshambhuni:

Report | Attachments | How To Reproduce

Report

Summary

I dont know how you would rate this issue, could be anywhere from informative to medium depending on how you look at it. I did stumble upon it in a way that would have put my project at risk, and I have made the same mistake multiple times and guess I am not the only one.

When editing project visibility settings there are three options (for each restriction you want to make, ex Issues):

  • turn the feature of by clicking the toggle button
  • restrict access to members only by picking "Only project members" in the dropdown
  • allow access to everyone by picking "Everyone with access" in the dropdown

As it turns out if you touch the toggle (either intentionally or by mistake which I often do) and then toggles it back on, then the dropdown will show "Only project members". But whatever you now pick in the dropbox the saved state will be "Everyone with access". So If you now save the settings while picking "Only project members" this setting will be ignored.

This also happens if you (like me) first turns the feature of, then saves the settings just to realize you did not want to turn it of just restrict it. So you go back into the settings, toggle the setting on and picks "Only project members" in the dropbox. If you now save the setting will be turned on BUT it will save it with the setting "Everyone with access".

As the user making the settings is logged in and "a member of the project" it is not clear to the user making the changes that they have not been properly configured.

I made exactly this mistake while trying to restrict access to a projects CI/CD. There is no indication that the settings have failed if you dont go back into the settings for visibility to check the settings again.

As you can see the severity of this can greatly differ. But in worst case it could expose critical information to unauthorized users. Importatn to note is that the flow triggering this flaw is probably really common as the instructions in the page are a bit unclear. The settings page is named "Visibility, project features, permissions" which have lured me to think that the toggle is for visibility multiple times. Just to realize that I have turned of a feature, making me trigger the reported issue.

Steps to reproduce
  1. Log in to Gitlab.com
  2. Create a Public project (call it "project1")
  3. Go to the project settings https://gitlab.com/USERNAME/project1/edit and expand "Visibility, project features, permissions"
  4. Flip some toggles back and forth (works on all of them)
  5. Make sure the dropboxes show "Only project members"
  6. Click save
  7. Expand the settings tab again and see that the settings are saved as "Everyone with access"
Impact

The flaw can leave projects exposing highly sensitive information to unauthenticated users.

Examples

If it is unclear, see the video here

recording-1642759209361.webm From the original on GitLab
What is the current bug behavior?

Toggling a setting defaults to "Everyone with access" even if "Only project members" are shown

What is the expected correct behavior?

The settings as shown in the UI should be adhered to

Output of checks

This bug happens on GitLab.com

Impact

The flaw can leave projects exposing highly sensitive information to unauthenticated users.

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

Impact

The flaw can leave projects exposing highly sensitive information to unauthenticated users.

What the attacker needed

A GitLab account; ability to create or edit a project; user toggles a feature off and on

How it was found

  1. Log in to GitLab.com
  2. Create a public project
  3. Go to the project settings and expand 'Visibility, project features, permissions'
  4. Flip some toggles back and forth
  5. Make sure the dropboxes show 'Only project members'
  6. Click save and then expand the settings tab again to see the saved state

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.

In GitLab, project settings let you control who can see features like issues or CI/CD. A bug makes the settings page show one option but save another, so you might think you've restricted access when you haven't. This could let anyone see your project's data.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.