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
-
Create Group A and apply ultimate trial
-
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
-
Go to https://gitlab.com/groups/Group A
-
Click on 3 dots on right corner and click on Request access
As OWNER
-
Go to groupA/-/group_members and click on Access requests and accept User
-
Add user 2 as a member, so Now your group has 2 members.
As User1
- Go to Group A you will see that you have access on a group
As User 2
- Go to Group A you will see that you don't have until you setup 2FA
Video
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:
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
- As owner, create a group and enable the option requiring all users to set up two-factor authentication.
- As User 1, request access to the group.
- As owner, accept the access request.
- As owner, add User 2 as a direct member.
- As User 1, access the group without setting up 2FA.
- 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.