GraphQL Attacks
Common Endpoints
/graphql
/api/graphql
/graphql/console
/graphql.php
/graphiqlIdentification
Fingerprint GraphQL Engine (graphw00f)
git clone https://github.com/dolevf/graphw00f.git
python3 main.py -d -f -t http://TARGETSecurity Audit (GraphQL-Cop)
git clone https://github.com/dolevf/graphql-cop.git
pip install -r requirements.txt
python3 graphql-cop.py -t http://TARGET/graphqlIntrospection Queries
List All Types
Get Fields of a Type
List All Queries
List All Mutations
Get Mutation Input Fields
Full Introspection Dump (paste into GraphQL Voyager)
IDOR / Broken Authorization
Identify
Query returns user data based on username/id argument
No session validation on query
Exploit - Read Other User's Password
Exploit - Enumerate All Users
SQL Injection
Identify
Send query without required argument → error reveals arg name
Test argument with
'→ SQL syntax error = injectable
Exploit - UNION SQLi in GraphQL
Note: Match number of columns to UserObject fields (use introspection to count)
Denial of Service (DoS)
Identify
Look for circular references in schema (User → Posts → Author → Posts)
Use GraphQL Voyager to visualize loops
Exploit - Nested Query DoS
Repeat nesting to crash server.
Batching Attacks (Brute Force Bypass)
Identify
GraphQL-Cop reports "Array-based Query Batching" as HIGH
GraphQL accepts JSON array of queries
Exploit - Multiple Queries in Single Request
Bypass rate limits by sending 1000+ login attempts per request.
Mutations - Privilege Escalation
Identify
Introspection reveals mutation with
roleinput fieldNo server-side validation of role value
Exploit - Register Admin User
XSS via GraphQL
Identify
Error messages reflect input without encoding
Send
<script>alert(1)</script>as argument
Test
Check if error message reflects XSS payload unencoded.
Tools
graphw00f
Fingerprint GraphQL engine
git clone https://github.com/dolevf/graphw00f
GraphQL-Cop
Security audit
git clone https://github.com/dolevf/graphql-cop
GraphQL Voyager
Visualize schema
https://graphql-kit.com/graphql-voyager/
InQL
Burp extension
BApp Store
Burp + InQL Workflow
Capture GraphQL request in Proxy
Right-click → Extensions → InQL → Generate queries
InQL tab shows all mutations/queries
Use GraphQL tab in Repeater for easy editing
Last updated