Bypassing GraphQL Brute Force Protections
The GraphQL login endpoint had a rate limiter that counted requests per origin, but it could be bypassed by sending multiple login attempts in a single GraphQL request using aliases. An attacker could brute force passwords and authenticate as any user, such as carlos.
osintteam.blog
Published on osintteam.blog
The lab demonstrates a common misconfiguration in GraphQL APIs related to brute force protection. In this case, the login system is powered by a GraphQL API that implements a basic rate limiter to mitigate brute force attempts.
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 rate limiter counted HTTP requests rather than individual login attempts, so batching many attempts into one GraphQL request bypassed it.
Impact
This vulnerability would allow attackers to bypass authentication protections, leading to unauthorized access to sensitive user accounts.
What the attacker needed
Access to the GraphQL login endpoint; a list of common passwords; ability to send custom HTTP requests
How it was found
- Open the lab and attempt to log in with random credentials.
- In Burp Suite's HTTP history, find the POST /graphql/v1 login request.
- Send the request to Repeater and try sending it repeatedly; after several attempts the server starts rejecting requests due to rate limiting.
- To bypass, send all password attempts in a single request using the provided password list.
- Use a Python script to generate a GraphQL query with multiple login attempts (aliases) and save it to a file.
- Copy the generated mutation into Repeater, remove the operationName parameter, and send it.
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 rate limiter is a security control that blocks too many login attempts from one place. Here, the limiter only looked at how many requests were made, not how many login tries were inside each request. By putting many password guesses into one request, the attacker avoided the limit and could guess passwords until one worked.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.