id: jira-serverinfo

info:
  name: Jira Rest API Server Information
  author: pdteam,0x_Akoko
  severity: info
  description: |
    Detected Jira REST API serverInfo endpoint is accessible without authentication, exposing sensitive server information including version, build number, server title, base URL, and server time.
  reference:
    - https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-server-info/
    - https://support.atlassian.com/jira/kb/restrict-unauthenticated-access-for-some-jira-endpoints/
  classification:
    cwe-id: CWE-200
  metadata:
    verified: true
    max-request: 2
  tags: jira,tech,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/rest/api/latest/serverInfo"
      - "{{BaseURL}}/rest/api/2/serverInfo"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"baseUrl"'
          - '"deploymentType"'
        condition: and

      - type: status
        status:
          - 200

    extractors:
      - type: json
        json:
          - ".baseUrl"
          - ".version"
# digest: 480a00453043021f3d15467b6edbc2b1943eee980c33c0c8f42e0207f0b27510167d79f5d9e68d022066aa7aa73ad2a299855e63fb6fa8fc909f16fe068b63d9a0a419f333262c403c:922c64590222798bb761d5b6d8e72950