Skip to content
Access control Disclosed report Beginner

User with expired password can still access sensitive info

A user whose password had expired could still access RSS/Atom feeds and other endpoints that exposed private project information, even though the rest of GitLab was blocked. An attacker with an expired password could read merge request details and other private data from internal and private projects.

GitLab

Originally disclosed on GitLab

  • Fixed in 3 months
  • Disclosed after 3 months

HackerOne report #1348738 by joaxcar on 2021-09-22, assigned to @vdesousa:

Report | Attachments | How To Reproduce

Report

Summary

When a users password expired the user can not access the GitLab instance before providing a new one. The user will not be able to view projects or groups, and not the merge request list in these projects where the user previously had access.

The latest patch to GitLab introduces a RSS feed for tracking updates to a projects merge requests. This feed is available to the user even after the rest of Gitlab is blocked due to password expiration.

This could be related to my previous report where a user with expired password could access the API, but I have not been able to confirm that.

(This also affect users who have retrieved a RSS feed prior to a "terms of service" is put in place by an admin. The user will be prompted with "accept or log out", if the user click deny and log out the user will not be able to access internal or private projects anymore. But can still access the RSS feeds!)

Steps to reproduce
  1. Create two users, one admin admin1 and one user user1
  2. Log in as admin1 and create a private project project1 on https://gitlab.domain.com/projects/new#blank_project
  3. Create a branch on https://gitlab.joaxcar.com/admin1/project1/-/branches/new and and click "create merge request" when the branch is created
  4. Create a merge request to main
  5. Go to https://gitlab.domain.com/admin1/project1/-/project_members and invite user1 as a Developer to the project
  6. Log out and log in as user1
  7. Go to https://gitlab.domain.com/admin1/project1/-/merge_requests
  8. Click the RSS icon
rss.png
rss.png From the original on GitLab
  1. Save the path to the RSS feed in a separate tab
  2. Log out and log in as admin1
  3. Go to the admin page for editing user1 https://gitlab.domain.com/admin/users/user1/edit and change the users password. This triggers "password expired at" to be set to the current time. Effectively putting the user1 in the state of "expired password"
  4. Log out
  5. Refresh the tab with the RSS feed and confirm that it still can access the feed.(This is done as user1)
Impact

A user with expired password can still access information about merge requests in internal and private projects

What is the current bug behaviour?

RSS feeds are accessible by users that have expired password

What is the expected correct behaviour?

RSS feeds should be blocked for users with expired password as the rest of GitLab

Output of checks

This bug happens on GitLab.com

Impact

A user with expired password can access a stream of information from internal and private projects which should be out of reach.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

@bdenkovych update

While reading the codebase I noticed that there are lots of endpoints that authenticate users with an expired passwords. Here is the list:

You can reproduce this issue for all those endpoints by following similar steps described for /*namespace_id/:project_id/-/merge_requests.atom.

As mentioned in https://gitlab.com/gitlab-org/gitlab/-/issues/343247#note_713877122, users like LDAP and OmniAuth users should retain access even with an expired password.

In https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/2042 I added test cases to cover all these endpoints.

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 authentication check for password expiry was not applied to certain endpoints such as RSS/Atom feeds and raw file downloads.

Impact

A user with an expired password could still access a stream of information from internal and private projects, including merge request details, which should have been blocked.

What the attacker needed

A GitLab account with expired password; access to a private project as a member; the RSS feed URL saved before expiry

The fix

Test cases were added to cover all affected endpoints in a merge request.

How it was found

  1. Create an admin user and a regular user.
  2. As admin, create a private project and a merge request.
  3. Invite the regular user as a Developer to the project.
  4. Log in as the regular user and open the merge requests page, then click the RSS icon and save the feed URL.
  5. As admin, edit the regular user and change their password to trigger password expiry.
  6. Refresh the saved RSS feed URL as the regular user and confirm it still loads.

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 password expires, a system should lock the account until a new password is set. Here, some parts of the site (like RSS feeds) did not check for password expiry, so an expired account could still read private project updates. This is like a building where the front door is locked but a side window is left open.

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.