id: wp-wp-mail-smtp-fpd

info:
  name: WordPress WP Mail SMTP - Full Path Disclosure
  author: ritikchaddha
  severity: low
  description: |
    WordPress WP Mail SMTP plugin is vulnerable to full path disclosure via direct access to plugin files.
  reference:
    - https://wordpress.org/plugins/wp-mail-smtp/
  metadata:
    verified: true
    max-request: 3
    vendor: developer
    product: wp-mail-smtp
    framework: wordpress
    fofa-query: body="/wp-content/plugins/wp-mail-smtp/"
  tags: wp,wordpress,wp-plugin,fpd,wp-mail-smtp,exposure

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/wp-mail-smtp/src/WPMailSMTP.php"
      - "{{BaseURL}}/wp-content/plugins/wp-mail-smtp/vendor/autoload.php"
      - "{{BaseURL}}/wp-content/plugins/wp-mail-smtp/src/Core.php"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Fatal error"
          - "wp-mail-smtp"
          - "Uncaught Error:"
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a0047304502202b8b3d8524dbed714997ff42f639d33a80cf59a0fed611a6513cdd20bef5241e022100e7999cb83f1495f309f8aa34e9ad6e265f07187c229b0799adaf193c907c5c76:922c64590222798bb761d5b6d8e72950