id: grafana-public-signup

info:
  name: Grafana Public Signup
  author: pdteam
  severity: medium
  description: Public Signup is enabled on Grafana.
  classification:
    cpe: cpe:2.3:a:grafana:grafana:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: grafana
    product: grafana
    shodan-query: title:"Grafana"
  tags: grafana,intrusive,misconfig

http:
  - raw:
      - |
        POST /api/user/signup/step2 HTTP/1.1
        Host: {{Hostname}}
        content-type: application/json
        Origin: {{BaseURL}}
        Referer: {{BaseURL}}

        {"username":"{{randstr}}","password":"{{randstr_1}}"}

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "User sign up completed successfully"

      - type: word
        words:
          - "grafana_sess"
          - "grafana_user"
        condition: and
        part: header

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