Skip to content
Access control Write-up Intermediate

From Manage Members to Full Admin: Privilege Escalation in a GraphQL API

A GraphQL mutation meant for managing members let a user who only had the manage_members permission change their own permission set. This allowed that low-privileged user to grant themselves stronger roles, up to full admin, and so take over the workspace or store.

bassemwanies2002 Follow

Published on medium.com

I’m Bassem (AKA. satan11), a bug bounty hunter and aspiring penetration tester. I publish real-world writeups to help others learn from the bugs I find in live programs.

Bassemwanies, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The backend did not distinguish managing other members from managing oneself and lacked an authorization check in the GraphQL resolver, so the manage_members permission was over-trusted.

Impact

A low-privileged user could read sensitive financial data, change configurations and roles, and lock out legitimate admins, effectively compromising the whole environment.

What the attacker needed

An account with manage_members only; access to the GraphQL API

The fix

The GraphQL resolver should check authorization and separate managing other members from managing oneself, so a user cannot change their own permission set.

How it was found

  1. Invite a user who has only the manage_members permission.
  2. Log in as that invited user and confirm the limited permissions in the UI.
  3. Send the UpdateMembership mutation to change that user's own permissions.
  4. Observe that the mutation succeeds and the role now includes permissions it should not have.
  5. Check the UI before and after to confirm the new permissions.

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 write-up has not been written yet. The Original tab links to the source.

A GraphQL API is a way for apps to ask a server for data or to change data using named actions called mutations. The server is supposed to check what each user is allowed to do before running an action. Here it did not check properly, so a user with a small permission could give themselves bigger permissions.

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 by bassemwanies2002

View all

3 more disclosed reports, best first.

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.