2022-03-15 13:13:35 +00:00
id : graphql-get-method
info :
name : GraphQL CSRF / GET method
author : Dolev Farhi
severity : info
description : |
Cross Site Request Forgery happens when an external website gains ability to make API calls impersonating an user if he visits the website while being authenticated to your API.
Allowing API calls through GET requests can lead to CSRF attacks, because cookies are added automatically to GET requests by the browser.
reference :
- https://graphql.org/learn/serving-over-http/#get-request
- https://github.com/dolevf/Damn-Vulnerable-GraphQL-Application
- https://cheatsheetseries.owasp.org/cheatsheets/GraphQL_Cheat_Sheet.html
- https://graphql.security/
2023-04-28 08:11:21 +00:00
metadata :
max-request : 2
2023-10-14 11:27:55 +00:00
tags : graphql,misconfig
2022-03-15 13:13:35 +00:00
2023-04-27 04:28:59 +00:00
http :
2022-03-15 13:13:35 +00:00
- method : GET
path :
- "{{BaseURL}}/graphql?query={__typename}"
2022-07-26 05:21:17 +00:00
- "{{BaseURL}}/api/graphql?query={__typename}"
2022-03-15 13:13:35 +00:00
2022-07-26 05:21:17 +00:00
stop-at-first-match : true
2023-10-14 11:27:55 +00:00
2022-03-15 13:13:35 +00:00
matchers-condition : and
matchers :
- type : word
part : body
words :
- '"query"'
- '"data"'
- '"__typename"'
case-insensitive : true
condition : and
- type : word
part : header
words :
2022-07-26 05:21:17 +00:00
- "application/json"
2023-10-19 13:13:52 +00:00
# digest: 4a0a0047304502201ccbd72a795be2c9ef0cc2e9204a08076ab109bc551c38bdba2a849b60442dbf022100c79b521763788ac0cfcf225fe4bb2de86456d9e0ba0667e5a96ff590d3f0509c:922c64590222798bb761d5b6d8e72950