Case C9F7C5 · Web AppSec · L3 Applied

Attacking and Defending GraphQL

Practise as: Deep diveLevel: L3 Applied
  1. 01 Context
  2. 02 Mechanism
  3. 03 Lessons
What a strong answer covers

Try it out loud first. Then check yourself:

  1. One endpoint, client-shaped queries: introspection maps the whole schema; field suggestions leak it even when disabled
  2. Authorization must be enforced per resolver or field; a check only on the top-level query leaves nested objects open (BOLA)
  3. Aliases and batched queries pack hundreds of operations in one request, bypassing per-request rate limits on login or OTP
  4. Deeply nested or circular queries cause resource exhaustion; use depth and cost limits, timeouts and pagination caps
  5. Lessons: disable introspection in prod, prefer persisted query allowlists, and reject GET or form-encoded mutations (CSRF)

If the interviewer pushes back

  • How would you rate-limit a GraphQL API meaningfully when every request hits the same URL?

Go deeper

More Web AppSec cards

All Web AppSec cards →

cardosec draws a security topic and gives you a clock: explain it out loud with no notes, then see what you covered and what you missed. Free during early access.

Reviewed 2026-10-09