id: cpanel-backup-exclude-exposure

info:
  name: cPanel Backup Exclusion Configuration - Exposure
  author: 0x_Akoko
  severity: info
  description: |
    cPanel backup exclusion configuration file (cpbackup-exclude.conf) was publicly accessible, potentially exposing directory structure and system paths.
  reference:
    - https://docs.cpanel.net/knowledge-base/backup/how-to-exclude-files-from-backups/
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cwe-id: CWE-200
  metadata:
    verified: true
    max-request: 2
  tags: cpanel,exposure,config,misconfig

http:
  - method: GET
    path:
      - "{{BaseURL}}/cpbackup-exclude.conf"
      - "{{BaseURL}}/.cpbackup-exclude.conf"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - "contains_any(content_type, 'application/octet-stream', 'text/plain', 'text/x-config')"
          - "status_code == 200"
          - "len(body) > 10"
        condition: and

      - type: word
        part: body
        words:
          - "<html"
          - "<!doctype"
          - "<script"
          - "<meta"
          - "<head"
          - "<body"
          - "application/json"
          - "application/xml"
          - "text/xml"
          - "image/"
        negative: true
# digest: 4b0a00483046022100d209da5d0ac708effadd5e204246b9282ebdef93002f77161df09d5cda0894ca0221009456baf0ea3c4fe8e825c59f7a39a86f1d8688928167ab27e30e78a34beda4c7:922c64590222798bb761d5b6d8e72950