id: wp-contact-form-7-fpd

info:
  name: WordPress Contact Form 7 - Full Path Disclosure
  author: pussycat0x
  severity: low
  description: |
    The WordPress Contact Form 7 plugin was detected to be vulnerable to Full Path Disclosure, where direct access to PHP files revealed the full server filesystem path and could aid further exploitation.
  reference:
    - https://wordpress.org/plugins/contact-form-7/
  tags: wordpress,wp-plugin,fpd,contact-form-7

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/contact-form-7/includes/functions.php"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200 || status_code == 500'
          - 'contains(body, "wp-content/plugins/contact-form-7")'
          - 'contains_all(body, "Fatal error", "Uncaught Error:") || contains_all(body, "Warning:", "failed to open stream")'
        condition: and
# digest: 4a0a00473045022100c3c326341293668ec6fa11e39e22830c9293ac29a540757b27840f3e64f168ec022052222927e49baa1d7d590516225b180a64cb2e517501dff28d5837e36832f5f2:922c64590222798bb761d5b6d8e72950