id: wp-widget-logic-fpd

info:
  name: WordPress Widget Logic - Full Path Disclosure
  author: DhiyaneshDk
  severity: low
  description: |
    WordPress Widget Logic plugin files are publicly accessible without ABSPATH protection, exposing sensitive server path information through PHP error messages when accessed directly.
  reference:
    - https://wordpress.org/plugins/widget-logic/
  metadata:
    max-request: 1
    verified: false
    publicwww-query: "/plugins/widget-logic/"
  tags: debug,wordpress,fpd,vuln,widget-logic,wp-plugin

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/widget-logic/widget_logic_admin_options.php"
      - "{{BaseURL}}/wp-content/plugins/widget-logic/widget-logic.php"

    stop-at-first-match: true

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