Skip to content
Access control Disclosed report Intermediate

Read-only user can delete higher privileged members using open DELETE /api/memberships/<membershipID> endpoint

The DELETE endpoint did not check the caller's role, so any member, including a read-only user, could remove higher-privileged members such as managers, administrators or the owner from an organisation.

chipped Follow

Originally disclosed on HackerOne

  • Triaged in 7 days
  • Fixed in 55 days
  • Paid in 13 days
  • Disclosed after 4 months

##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:

  1. Create two accounts, user 1 (admin), user 2 (read-only member) with any organization name
  2. You should already have the orgs set up, so for user 1, head over to the Users tab on the left
  3. Click Add User on the right
  4. Enter user 2's email (make sure their permission is read-only) and submit
  5. Log in to user 2
  6. Click Switch next to user 1's organization (should be at the home page)
  7. Turn on burp or any proxy and start intercepting
  8. Click on users on the left
  9. 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)
    POC1.png
    POC1.png From the original on HackerOne
  10. Look for user 1's email and store the membership ID (id)
  11. Now go to user 2 and switch back to their organization and add user 1 to that org (perms don't matter)
  12. This will instantly add them to the user list without an invite
  13. Start intercepting and delete them from the user list
  14. Send the DELETE /api/memberships/id to repeater
  15. Now put the membership ID you stored earlier and replace it with the current ID, this should then delete the membership
    POC2.png
    POC2.png From the original on HackerOne
  16. 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.

The original report as published on HackerOne, by chipped. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Root cause

Likely the endpoint only checked that the caller was a member of the organisation, not that they had permission to remove other members.

Impact

Any member could remove any other member, including administrators, which could disrupt an organisation by kicking out its administrators.

What the attacker needed

Membership in the target organisation; ability to intercept HTTP requests

How it was found

  1. Create an admin account and a read-only member account in an organisation.
  2. As the admin, add the read-only user to the organisation.
  3. Log in as the read-only user and switch to the admin's organisation.
  4. Capture the GraphQL PaginatedMembershipsQuery to obtain the admin's membership ID.
  5. Switch back to the read-only user's own organisation, add the admin there, then intercept the delete request.
  6. Replace the membership ID in the DELETE request with the admin's ID and send it, removing the admin from their organisation.

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.

In many apps, users have roles like 'read-only' or 'admin'. A read-only user should only be able to view things, not change them. Here, the server accepted a delete request from a read-only user and removed other people from the organisation, which should have been blocked.

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 Helium

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.