GraphQL_Security Testing
GraphQL_Security Testing
GraphQL
Security Testing
/graphql
/graphiql
/graphql.php
/graphql/console
Finding GraphQL endpoints /api
GraphQL Schema /api/graphql
Obtain GraphQL API schema even if the introspection is If introspection is enabled but the above query doesn't run, try removing the
onOperation, onFragment, and onField directives from the query structure. Many
disabled via errors
Introspection Full Introspection Query
endpoints do not accept these directives as part of an introspection query, and you
Detection and building of a GraphQL schema from proxy can often have more success with introspection by removing them
traffic
Inline introspection query:
GraphQL Wordlist
{
Inspect/Sources/"Search all files"
Use the Sources tab of the developer tools to search all JS files to "operationName":"updateProfile",
file:* mutation
enumerate where the queries are saved. IDORs Change the object reference ( id,username,email,others) to another user's "variables":{"username":INJECT,"data":INJECT},
file:* query
"query":"mutation updateProfile($username: String!,...){updateProfile(username: $username,...){...}}"
}
Try to add more fields like when request query it has just id,name try to add some
Bypass authorization in GraphQL
fields like password,apikey,................
Vulnerabilities
Try to add operation endpoint/operationName with the old one to chaine queries
Denial of service