id: wp-haberadam-idor

info:
  name: WordPress Themes Haberadam JSON API - IDOR and Path Disclosure
  author: pussycat0x
  severity: low
  description: This template is designed to detect a misconfiguration vulnerability in WordPress themes that use the Haberadam JSON API. This vulnerability can lead to an Insecure Direct Object Reference (IDOR) and path disclosure, potentially exposing sensitive information.
  reference:
    - https://cxsecurity.com/issue/WLB-2021090078
  metadata:
    max-request: 2
    google-query: inurl:/wp-content/themes/haberadam/
  tags: wordpress,idor,wp-theme,disclosure

http:
  - method: GET
    path:
      - '{{BaseURL}}/wp-content/themes/haberadam/api/mobile-info.php?id='
      - '{{BaseURL}}/blog/wp-content/themes/haberadam/api/mobile-info.php?id='

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"status"'
          - '"hava"'
          - '"degree"'
          - '"icon"'
        condition: and

      - type: status
        status:
          - 200

      - type: word
        part: header
        words:
          - text/html
# digest: 490a0046304402203d76e8a118e3034912ae97c69b537a38b1ba910876a2fd4e9bb91544e7458128022026e6ce4922d152144517329757d75e1d23a906e7b529b9df7a8b34ad199c6a75:922c64590222798bb761d5b6d8e72950