A GraphQL authorization gap is proven when a query you are allowed to send returns a field or a node you should not see. Test per field, not per route — one resolver missing a check exposes the data through every parent type that includes it.
Where this class of bug actually lives in a GraphQL schema
- Field-level leaks.
User.email,User.stripeIdorOrganization.membersreadable by any authenticated caller because only the query root was checked. - Nested traversal.
viewer { organizations { invoices { lineItems } } }reaches objects the root never authorized. - Node and relay ids.
node(id:)with a base64 type-and-id is a direct object reference across the whole schema. - Introspection and cost. Introspection on in production maps the schema; no depth or cost limit turns one query into a denial of service.
What to try first
- Run introspection and list every field on types that appear under more than one parent.
- Query a field you should not see on an object you may see — email on another user's public profile.
- Walk two hops outward from your own node to another tenant's objects.
- Send a deeply nested recursive query and measure response time and memory.
A reproduction you can keep
Field-level access is the check that finds the most. One query, two identities:
curl -sS https://staging.example.com/graphql \
-H 'Authorization: Bearer ***' -H 'Content-Type: application/json' \
-d '{"query":"{ organization { members { email role stripeCustomerId } } }"}'
curl -sS https://staging.example.com/graphql \
-H 'Content-Type: application/json' \
-d '{"query":"{ organization { members { email } } }"}'
# vulnerable: the second, anonymous call returns member emails
# fixed: the field resolves to null or the resolver 403s, for anon and for members alikeWhat "fixed" has to look like
Authorize in the resolver or a field-level middleware, not at the query root, so every field and every node checks the caller. Verify by querying each sensitive field anonymously and as a low-privilege user; both must return null or an error.
Where people get this wrong
- A single root-level auth check covers the entry point and nothing underneath.
- Relay global ids are object references. Treat
node(id:)as an IDOR surface across the entire schema. - Disabling introspection hides the map and adds no authorization.
What Offense does here
Offense runs an agent swarm against your app in a disposable sandbox, keeps the request, the identity and the vulnerable response as evidence, and replays the same attack after the fix so the retest is a control comparison rather than a green check. It does not read your source and it does not patch your code: the finding goes to your coding agent with the reproduction attached. The hosted workspace is invite-only — join the waitlist — and the free dependency audit in /install needs no account.
Questions this page answers
Why is GraphQL authz harder than REST?
Because there is one endpoint and many resolvers. REST authorizes per route; GraphQL has to authorize per field and per node.
Should introspection be disabled in production?
It reduces reconnaissance. It is not an access control, and the fields still need checks.
Written by Offense Research, reviewed December 2, 2026. Correct something? Email imran@offenseresearch.com.