id: graphiql-exposure

info:
  name: GraphiQL - Exposure
  author: Vincent Olagbemide
  severity: low
  description: |
    Detected publicly exposed GraphiQL consoles.
  reference:
    - https://github.com/graphql/graphiql
  metadata:
    verified: true
    max-request: 6
    shodan-query: html:"GraphiQL"
  tags: misconfig,graphql,graphiql,exposure

http:
  - method: GET
    path:
      - "{{BaseURL}}/graphiql"
      - "{{BaseURL}}/graphql"
      - "{{BaseURL}}/api/graphql"
      - "{{BaseURL}}/v1/graphql"
      - "{{BaseURL}}/query"
      - "{{BaseURL}}"

    redirects: true
    max-redirects: 2

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "graphiql.createFetcher"
          - "id=\"graphiql\""
          - "id='graphiql'"
          - "/graphiql.css"
        condition: or

      - type: status
        status:
          - 200
# digest: 4b0a004830460221009497dc906be231b68a9a2cee691663ca9530d128f7c23e25d7cdcb24f8a3898f022100d0c9b26f327fe239a724bce8afad13778c4d73e4c4c8699248d2b6ea57e97d89:922c64590222798bb761d5b6d8e72950