id: wp-wpforms-lite-fpd

info:
  name: WordPress WPForms - Full Path Disclosure
  author: DhiyaneshDk
  severity: low
  description: |
    WordPress Plugin WPForms files are publicly accessible without ABSPATH protection, exposing sensitive server path information through PHP error messages when accessed directly.
  reference:
    - https://wordpress.org/plugins/wpforms-lite/
  metadata:
    verified: true
    max-request: 1
    fofa-query: body="/wp-content/plugins/wpforms-lite"
  tags: wp,wordpress,wp-plugin,fpd,wpforms-lite,misconfig

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/wpforms-lite/src/Frontend/Modern.php"

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "Fatal error", "Uncaught Error") || contains_all(body, "Warning:", "failed to open stream")'
          - 'status_code == 200 || status_code == 500'
          - 'contains(body, "wpforms-lite")'
        condition: and
# digest: 490a0046304402200de906bf18401e072eb39e38a629e23dbd44e8116447fb8c81f7371ed2058f4c02201ec0ce4928ed6927a831532d6b4d1dd0027b328d734e04bb8b8977e7c7ee6f14:922c64590222798bb761d5b6d8e72950