id: unauth-temporal-web-ui

info:
  name: Temporal Web UI - Unauthenticated Access
  author: ggranjus
  severity: high
  description: |
    Temporal Web UI was able to be accessed because no authentication was required
  reference:
    - https://docs.temporal.io/web-ui
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cwe-id: CWE-200
    cpe: cpe:2.3:a:temporal:temporal:*:*:*:*:*:*:*:*
  metadata:
    verified: "true"
    max-request: 2
    shodan-query: http.favicon.hash:557327884
    product: temporal
    vendor: temporal
  tags: misconfig,temporal,unauth,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/favicon.ico"
      - "{{BaseURL}}/api/v1/namespaces/default/workflows?query="

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - "status_code_1 == 200 && (\"44c856843ce2631b1d6968ac11fa9ec4\" == md5(body_1))"

      - type: dsl
        dsl:
          - "contains(body_2, 'nextPageToken') && status_code_2 == 200"
          - "contains(body_2, 'Namespace default is not found.') && status_code_2 == 404"
        condition: or
# digest: 4a0a00473045022100b62e71ffce6227268137d0d4069a21de1d9f93ee34f9585469696aa6b27a6cc102206c37372a591766ce9aec98ab993320164e06788d1308918d9f8fc4535ff63a38:922c64590222798bb761d5b6d8e72950