Vulnerability Disclosure: Application-Layer DoS via GraphQL Array Batching
The GraphQL endpoint accepted mutation arrays without bounds or complexity limits, so a single request with many inputs forced synchronous processing. An attacker could send a large array to exhaust database connections and CPU, potentially taking the service offline.
Published on medium.com
GraphQL provides incredible flexibility for frontend developers, but if not strictly locked down, that same flexibility can be weaponized against the backend. During recent independent security testing, I identified a critical resource exhaustion vulnerability within a target’s GraphQL API that allowed for a…
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 mutation resolver processed array inputs synchronously without enforcing array size limits or query cost analysis.
Impact
An unauthenticated attacker could scale the batch size to exhaust database connections and CPU, potentially taking the service offline; testing was stopped at 500 inputs to avoid a full denial of service.
What the attacker needed
Network access to the GraphQL endpoint; no authentication required
The fix
The endpoint should enforce maximum array sizes, apply query cost analysis, and add rate limiting.
How it was found
- Send a normal mutation with one input and record the response time.
- Use the tester script to generate a mutation with 500 unique inputs.
- Send the expanded mutation and observe the increased response time.
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 GraphQL API lets clients ask for exactly the data they need, often in batches. Here the server did not cap how many items one batch could contain, so a single request with hundreds of items kept the server busy for seconds. Sending many such requests could make the service slow or unavailable for everyone.
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.