Skip to content
DoS Write-up Intermediate

From One Mutation to a Full Service Outage: A GraphQL DoS Story

A GraphQL mutation for creating batches could be repeated many times in a single HTTP request using aliases, and rate limiting only counted HTTP requests, not the number of operations inside them. An attacker could send parallel requests with many aliases to exhaust server resources and take the entire application offline.

medium.com

Published on medium.com

In this post, I will explain how a simple GraphQL feature turned into a full application-level Denial of Service attack.

Kayra Öksüz, 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 server did not limit the number of aliases per request, did not calculate the cost of each mutation, and applied rate limiting only per HTTP request rather than per operation.

Impact

The application became completely unresponsive, returning Cloudflare 524 timeout errors, and the entire platform went offline; the attack could be easily repeated.

What the attacker needed

Access to the GraphQL API; ability to send HTTP requests

The fix

The issue was fixed by counting each alias call as a separate operation, so rate limiting applies per alias and running hundreds of mutations in a single request is no longer possible.

How it was found

  1. Identify the GraphQL mutation that creates a batch.
  2. Use GraphQL aliases to repeat the same mutation many times in one request.
  3. Increase the alias count and measure server response time to confirm resource consumption.
  4. Send many parallel HTTP requests, each containing many aliases, to overwhelm the server.

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 several operations in one request by giving each a different name (an alias). The server here did not limit how many of these aliases could be used, and its rate limiting only looked at the number of HTTP requests, not the work inside them. So a single request could trigger hundreds of heavy database operations, and sending many such requests at once overwhelmed the server until the site stopped responding.

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.

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.