Skip to content
Access control Disclosed report Beginner

A group member who joined by requesting access can access group without setting up 2FA despite group Requires 2FA on all members

A group with 2FA enforcement enabled allowed a user who joined by requesting access to access the group without setting up 2FA, while a directly added member was blocked until 2FA was configured. An attacker could thus access a protected group without the required second factor.

GitLab

Originally disclosed on GitLab

  • Fixed in 4 months
  • Disclosed after 4 months

⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.

HackerOne report #2919391 by salh4ckr on 2025-01-01, assigned to @ngeorge1:

Report | Attachments | How To Reproduce

Report

Summary

Hello, Happy new Year,

Gitlab has a group protection option that restricts access to only members with 2fa enabled on their accounts, [more here] 1

but i found weird behavior where this 2fa enforcement do not apply to members who self requested access to a group.

Steps to reproduce
As OWNER
  1. Create Group A and apply ultimate trial

  2. Go to Group A settings (-/edit#js-permissions-settings) and Enable option called "All users in this group must set up two-factor authentication"

As User 1
  1. Go to https://gitlab.com/groups/Group A

  2. Click on 3 dots on right corner and click on Request access

As OWNER

  1. Go to groupA/-/group_members and click on Access requests and accept User

  2. Add user 2 as a member, so Now your group has 2 members.

As User1

  1. Go to Group A you will see that you have access on a group

As User 2

  1. Go to Group A you will see that you don't have until you setup 2FA

Video

2FA.mp4 From the original on GitLab
What is the current bug behavior?

2FA enforcement on group does not apply to group members who joined a group by requesting access

What is the expected correct behavior?

2FA enforcement should applies to all group members

Impact

A group member who joined by requesting access can access group without setting up 2FA, this put a group at risks of unauthorized access even if owner protected his/her group by requiring 2fa before accessing a group.

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

A group member who joined by requesting access can access the group without 2FA, potentially allowing unauthorised access even when the owner required 2FA.

What the attacker needed

Group owner enables 2FA requirement; Attacker requests access to the group; Owner accepts the access request

How it was found

  1. As owner, create a group and enable the option requiring all users to set up two-factor authentication.
  2. As User 1, request access to the group.
  3. As owner, accept the access request.
  4. As owner, add User 2 as a direct member.
  5. As User 1, access the group without setting up 2FA.
  6. As User 2, attempt to access the group and be blocked until 2FA is set up.

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.

Two-factor authentication (2FA) adds a second step, like a code from a phone, when logging in. A group owner can require all members to use 2FA. The report shows that someone who joined by asking for access could get in without setting up 2FA, while someone added directly could not.

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.