Skip to content
Account takeover Write-up Intermediate

Infinite Loops, Infinite Loot: Exploiting an Overlooked API Rate

The GraphQL API lacked rate limiting on the login mutation, allowing an attacker to brute-force weak passwords and obtain access tokens for hundreds of accounts, some with admin privileges. Once authenticated, the API exposed sensitive user data and internal API keys.

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 login mutation lacked any rate limiting or account lockout mechanism, allowing unlimited password guesses.

Impact

The attacker could take over hundreds of accounts, including admin accounts, and access sensitive user data and internal API keys, potentially leading to a full data breach.

What the attacker needed

GraphQL endpoint accessible; No rate limiting on login; Weak user passwords

The fix

The API should implement rate limiting and account lockout on the login mutation to prevent brute-force attacks.

How it was found

  1. Discover a GraphQL endpoint at api.target.com/v2/graphql.
  2. Use introspection to map the schema and find login mutation.
  3. Send repeated login attempts with different passwords without being blocked.
  4. Write a script to brute force accounts with weak passwords.
  5. Obtain access tokens for hundreds of accounts, some admin.
  6. Use authenticated queries to access sensitive data and API keys.

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.

A login form should limit how many times you can try a password, to stop someone guessing thousands of combinations. Here, the API allowed unlimited attempts, so the attacker could try many passwords quickly and break into accounts with weak passwords.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by iski

View all

186 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.