Inherited group member and Direct shared group member can share the group with other members contrary to documentation
GitLab
Originally disclosed on GitLab
- Fixed in 44 hours
- Disclosed after 44 hours
⚠️ 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 #2044962 by theluci on 2023-06-30, assigned to @kmorrison1:
Report | Attachments | How To Reproduce
Report
Hello,
I stumbled upon this bug.
I’m not sure whether this is a documentation update or a security fix, regardless I thought it should be reported.
Background
Gitlab provides various types of memberships,

For Direct shared membership, one may use Invite a group option,

In the above example, Direct members of My-other-group are Direct shared members of a-new-group.
Vulnerability
According to docs, Inherited group member and Direct shared group member cannot share the group with other members.

That is, a member that has Inherited membership or Direct shared membership in a group should not be able to invite new members to the group.
However, the above is not enforced.
Steps to reproduce
attackercreates a groupattacker-groupand addsvictimas guest.victimcreates a groupvictim-group.victimgoes tohttps://gitlab.com/groups/<victim-group>/-/group_members, clicks on Invite a group and inviteattacker-groupas owner.
attacker is now a Direct shared group member of victim-group.
attackergoes tohttps://gitlab.com/groups/<victim-group>/-/group_members, clicks on Invite members and invite a user.
attacker is able to share the group with other members contrary to documentation.
Note:
Above I’ve only demonstrated the attack for Direct shared group members but it is also possible with Inherited membership.
Output of checks
This bug happens on GitLab.com (Probably on instance too).
Impact
Inherited group member and Direct shared group member can share the group with other members contrary to documentation.
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.
What is known
A access control bug in gitlab.com. GitLab made it public on 14 July 2023. Fixed in version 16.2.
About 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.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
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.