Skip to content
Access control Write-up Beginner

Who Needs Admin When You Have GraphQL? Abusing Queries for Fun an

A GraphQL endpoint accepted unauthenticated requests and exposed its full schema through introspection, revealing queries and mutations. The author read another user's details including the admin account and changed a user's role to admin, then used that account to reach an admin dashboard.

iski Follow

Published on infosecwriteups.com

Free Link🎈

Iski, on infosecwriteups.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

Likely the GraphQL endpoint had no authentication or authorisation checks, so introspection and both read and write operations were available to anyone.

Impact

An unauthenticated attacker could read user data and escalate any account to admin, reaching internal reports, personal data and application secrets.

What the attacker needed

No account needed; network access to the GraphQL endpoint

How it was found

  1. Find the GraphQL endpoint in JavaScript files during recon
  2. Send an introspection query to dump the schema
  3. Query a user by ID and receive the admin record
  4. Send a mutation to set another user's role to admin
  5. Log in with the now-admin account and open the admin dashboard

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 an API style where the client asks for exactly the fields it wants. If the server lets anyone ask what queries and changes exist (introspection) and does not check who is calling, a stranger can read other people's data and even change their permissions. Here the endpoint had no login check at all.

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 iski

View all

186 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.