Field manual · BAC · Chapter 6
GraphQL & API-Level BAC
Odds and ends
Chapter 6: GraphQL and API-level BAC
Section titled “Chapter 6: GraphQL and API-level BAC”Why care: one GraphQL endpoint can hide the same missing check hundreds of times, once per resolver. GraphQL plays a special role in BAC because authorization per field is hard, humans get lazy:
1. per-resolver drift: query { me { email } } → email visible: your data query { user(id: 8842) { email } } → same field, different resolver, authz forgotten
2. privileged introspection-only fields: query { __schema { mutationType { fields { name } } } } → mutation names reveal "adminDeleteUser", "grantRole", etc. → test them directly with a standard-user token
3. depth/complexity abuse as a probe: nested queries that only "should" work for admins — if it runs for a standard user, that's a response-shape leak (and data leak if fields resolve)
4. subscriptions/sockets often lack role checks: subscription { userUpdated(id: 8842) { email } }And the REST cousin-finder: each new API version often drops authz checks for old still-alive versions. /api/v1/users (all fields including internal) vs /api/v2/users (whitelisted fields). Testing ONLY v2 is how hunters miss the free v1 loot. Test all live versions. Every time.
This chapter is short because GraphQL authorization deserves its own guide. The IDOR guide’s GraphQL section covers introspection abuse, the node() universal IDOR, Clairvoyance, aliasing and batch races, and Relay/federation chaining.
Subscriptions run over WebSockets, which skip the HTTP middleware after the handshake. The WebSocket guide’s CSWSH chapter covers cross-site hijacking and per-message checks.
Next step: Chapter 7 covers the timing side of the same bug, authorization that exists, but only after a delay an attacker can beat.
Open local graph around this page
Broken Access ControlFor authorized security research only: bug bounty programs, your own systems, or scoped engagements with written permission.