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"
          - "consul-network-segment"
        condition: and

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