Skip to content
DoS Write-up Intermediate

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.

Ahmed Ibrahim Follow

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…

Ahmed Ibrahim, on medium.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 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

  1. Send a normal mutation with one input and record the response time.
  2. Use the tester script to generate a mutation with 500 unique inputs.
  3. 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.

More by Ahmed Ibrahim

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.