Skip to content
Access control Write-up Intermediate

GraphQL Introspection to Admin Takeover: Exploiting Unauthenticated APIs

An unauthenticated GraphQL endpoint allowed introspection, user enumeration, and creation of administrator accounts. An attacker could obtain a magic login link and take over the management dashboard with full privileges.

BaymaxPop23 Follow

Published on medium.com

How a single misconfigured endpoint exposed users and allowed the creation of administrator accounts

Source_To_Sink, 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

Likely the GraphQL resolvers lacked authentication and authorization checks, and introspection was left enabled in production, allowing schema discovery and privileged mutations without a valid session.

Impact

An attacker could take over the admin dashboard, view all user and business data, modify configurations, create more admins, and delete or modify users.

What the attacker needed

Network access to the GraphQL endpoint; No valid session required

The fix

The endpoint should require authentication and field-level authorization on every resolver, disable introspection in production, and add rate limiting and query complexity limits.

How it was found

  1. Observe GraphQL requests to /prod/graphql in network traffic.
  2. Run an introspection query to list all types, queries, and mutations.
  3. Use the searchOperatorUserTable query to enumerate all users and their details.
  4. Introspect the CreateOperatorUserInput type to learn required fields.
  5. Send a createOperatorUser mutation with admin roles to create a new administrator account.
  6. Use the returned magic login link to access 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 a way for apps to ask a server for exactly the data they need through one address. Here, that address did not check who was asking, so anyone could list all users and even create a new admin account. The server then handed back a special login link that gave full control of the dashboard.

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 BaymaxPop23

View all

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