id: hashicorp-consul-unauth
info:
  name: Hashicorp Consul API Unauthenticated
  author: pussycat0x
  severity: medium
  description: |
    In HashiCorp Consul's API without authentication arises when Consul is improperly secured, exposing its endpoints to unauthorized access.
  reference:
    - https://www.acunetix.com/vulnerabilities/web/hashicorp-consul-api-is-accessible-without-authentication/
  metadata:
    verified: true
    max-request: 1
    shodan-query: product:"Consul"
  tags: hashicorp,consul,unauth,misconfig

http:
  - method: GET
    path:
      - "{{BaseURL}}/v1/health/service/consul"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Node"
          - "Service"
        condition: and

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