id: wp-links-opml

info:
  name: WordPress wp-links-opml.php - Version Disclosure
  author: princechaddha
  severity: info
  description: |
    WordPress wp-links-opml.php file was publicly accessible and expossed the WordPress version in the generator tag.
  reference:
    - https://www.acunetix.com/vulnerabilities/web/wordpress-version-disclosed/
    - https://wordpress.org/
  classification:
    cpe: cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: wordpress
    product: wordpress
    shodan-query:
      - http.component:"wordpress"
      - cpe:"cpe:2.3:a:wordpress:wordpress"
  tags: exposure,wordpress,wp,version,files

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-links-opml.php"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "generator="
          - "WordPress/"
        condition: and

      - type: word
        part: header
        words:
          - "text/xml"

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        name: version
        group: 1
        regex:
          - '(?i)generator="?WordPress/([0-9.]+)"?'
# digest: 490a0046304402205067c0ed8bdd767ef052fcc19a45a7cfadab67ed4527cbbd8809ef5b9d722a80022065bfed0ec45b42086566cb12b151138a5435e926fdedb2644bcb47a71c5e5c7c:922c64590222798bb761d5b6d8e72950