Inherited group member and Direct shared group member can share the group with other members contrary to documentation
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:


