Helium · Report #810320
Read-only user can delete higher privileged members using open DELETE /api/memberships/<membershipID> endpoint
How it was found
Summary
The /api/memberships/membershipID endpoint on console.helium.com is open to anyone, including read-only users in an organization. This means that a read-only member can kick a manager, administrator, or even the owner out of an organization using this vulnerability.
Steps to Reproduce:
- Create two accounts, user 1 (admin), user 2 (read-only member) with any organization name
- You should already have the orgs set up, so for user 1, head over to the
Userstab on the left - Click
Add Useron the right - Enter user 2's email (make sure their permission is read-only) and submit
- Log in to user 2
- Click Switch next to user 1's organization (should be at the home page)
- Turn on burp or any proxy and start intercepting
- Click on users on the left
- Look for the GraphQL request with the operation name of PaginatedMembershipsQuery, this will list all memberships in that organization (including the ID, which is what we're looking for) {F736503}
- Look for user 1's email and store the membership ID (
id) - Now go to user 2 and switch back to their organization and add user 1 to that org (perms don't matter)
- This will instantly add them to the user list without an invite
- Start intercepting and delete them from the user list
- Send the
DELETE /api/memberships/idto repeater - Now put the membership ID you stored earlier and replace it with the current ID, this should then delete the membership {F736504}
- Refresh the page for user 1, it will actually log them out as well with a 401 of
You don't have access to this organization
This will remove any user from the organization. This is particularly dangerous if you want to take over an organization, except the only thing you can do is kick users out, the rest is still read-only. This is also possible for managers, they can remove administrators, which is more impactful since managers actually have permission within the org. So as a result, administrators wouldn't be able to supervise the hacker and he would have complete control over the organization.
Impact
You can kick any user you want from an organization as long as you are a member.