**Privilege Escalation in GraphQL : Exploiting Finance Role Token to Access Admin Data : Part 1**
A GraphQL endpoint did not check the caller's role, so a user holding a finance-role token could send admin-level mutations and read or change admin data. The author describes replaying an admin request with a lower-privilege token and a different product ID to confirm the escalation.
Published on hackersatty.medium.com
Hi everyone! My name is Satyam Pawale, also known as @hackersatty in the bug bounty world.
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
Likely the GraphQL resolvers did not enforce role-based access control, so any valid token was accepted for admin-level queries and mutations.
Impact
An attacker with a low-privilege token could access admin-level data and perform administrative actions, potentially manipulating sensitive records.
What the attacker needed
A valid finance-role token; knowledge of an admin request; ability to send GraphQL requests
The fix
The endpoint should enforce role-based access control on every GraphQL query and mutation, validating the token's role before execution.
How it was found
- Enumerate GraphQL endpoints and list available queries and mutations.
- Capture a GraphQL request sent by an admin or high-privilege user.
- Replace the admin token with a lower-privilege finance-role token.
- Change the product ID to one belonging to an admin-level product.
- Resend the modified request and check whether the server processes it.
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.
GraphQL is a way for apps to ask a server for exactly the data they need. Each request carries a token that says who you are and what role you have. Here the server never checked that role, so a low-privilege user could do things only an admin should be able to do.
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.