Skip to content
Access control Write-up Beginner

$1000 Bug using simple Graphql Introspection query

A GraphQL query that returned MFA recovery codes did not check for a password, even though the user interface asked for one before showing them. An attacker who could reach that query could obtain the recovery codes and use them to get past multi-factor authentication.

Piyush Kumawat Follow

Published on infosecwriteups.com

{{media:0}}

Piyush Kumawat (securitycipher), 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 resolver that returns recovery codes did not verify the user's password or re-authenticate the session, relying only on the UI prompt for protection.

Impact

An attacker could obtain MFA recovery codes without knowing the password, which could allow bypassing multi-factor authentication; the text does not show the full account-takeover chain.

What the attacker needed

An account with MFA enabled; GraphQL introspection enabled; access to the GraphQL endpoint

How it was found

  1. Enable MFA on the account and note that a recovery code is shown
  2. Open the recovery codes option and observe that a password prompt appears
  3. Run a GraphQL introspection query against the application's endpoint using the InQL Scanner extension
  4. Find the query related to recovery codes in the returned schema
  5. Send that query in Burp Repeater and observe the recovery code returned without a password

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.

Multi-factor authentication (MFA) is a second login step, such as a code from an app. Recovery codes are backup codes you can use when you lose access to that second step. The app's screen asked for your password before showing these codes, but the underlying request did not actually check the password, so anyone who could send that request got the codes.

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.

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.