Skip to content
Access control Write-up Beginner

Exploiting Broken Authentication Control In GraphQL

The GraphQL API's brassCheckAccess query trusted a username supplied by the client to decide whether the caller held the ABC_Admin role, instead of deriving the identity from the session. An attacker could enumerate administrative usernames and then substitute one in the request to gain full administrative access to the application.

Aleksa Zatezalo Follow

Published on praetorian.com

The implementation of GraphQL in enterprise systems has grown rapidly. A recent report from Gartner predicted that at least 50% of enterprises will be implementing GraphQL in their production environments by the end of the calendar year.

Justin Copeland, on praetorian.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 brassCheckAccess GraphQL query accepted a username from the request and used it for the authorization decision without validating it against the caller's session or cookie.

Impact

An attacker could gain full administrative privileges, allowing them to edit application metadata and exfiltrate sensitive financial data.

What the attacker needed

A valid non-admin account; ability to intercept and modify requests; knowledge of an admin username

How it was found

  1. Access the admin panel as a non-administrative user and observe the 'Access Denied' message.
  2. Proxy the requests through Burp Suite and identify the GraphQL query brassCheckAccess, which takes a username and the ABC_Admin id.
  3. Use Burp Intruder with a list of potential administrative usernames to find usernames that return is_authorized true.
  4. Intercept a request to the admin panel from the test user and replace the username with an authorized administrative username.
  5. Access the admin panel with administrative privileges.

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.

The application asked the browser 'which user are you?' and believed the answer, rather than checking the logged-in session. So anyone could claim to be an administrator by editing the request. This is a broken access control problem: the server must decide permissions from the session, not from user-supplied input.

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 Aleksa Zatezalo

View all

1 more disclosed report, 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.