How GraphQL Mutation Aliasing Led to a $12,500 DoS Bug in HackerOne’s Account Recovery Flow
The GraphQL mutation verifyAccountRecoveryPhoneNumber could be repeated many times in a single request using aliases, and each repetition caused the backend to perform an expensive verification operation taking around 8 seconds. An authenticated attacker could therefore force the server to do large amounts of work from a small number of requests, causing timeouts and resource exhaustion.
Published on infosecwriteups.com
In this article, I am breaking down a Denial-of-Service report involving HackerOne’s GraphQL API, where the verifyAccountRecoveryPhoneNumber mutation could be executed multiple times inside one request using GraphQL aliases.
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 API allowed multiple aliases of the same expensive mutation in one request without enforcing a strict cost, alias, or mutation execution limit, so the backend executed each alias independently.
Impact
A single authenticated user could send a GraphQL request with multiple aliases and force the backend to perform the same expensive verification operation repeatedly, consuming server resources and affecting availability; timeouts reduced but did not fully solve the issue.
What the attacker needed
An authenticated account; access to account recovery settings
The fix
The API should limit aliases per request, block duplicate expensive mutations, add query complexity scoring, resolver-level rate limits, timeouts with cancellation, and make invalid input fail quickly.
How it was found
- Log in as a normal user and go to account recovery settings.
- Add a phone number and enter the verification code.
- Intercept the GraphQL request that calls verifyAccountRecoveryPhoneNumber.
- Repeat the mutation several times in the same request using aliases.
- Observe that each alias adds around 8 seconds of processing time and that more aliases cause timeouts.
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 lets a client ask for the same operation several times in one request by giving each copy a different name, called an alias. Here the server ran the expensive phone-verification step once for every alias instead of once per request, so a single request could keep the server busy for a long time. An attacker with a normal account could send a few such requests and make the service slow or unstable for other people.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.