id: wp-add-search-to-menu-fpd

info:
  name: WordPress Ivory Search - Full Path Disclosure
  author: DhiyaneshDk
  severity: low
  description: |
    WordPress Plugin Ivory Search 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/add-search-to-menu/
  metadata:
    verified: true
    max-request: 1
    publicwww-query: "/plugins/add-search-to-menu"
  tags: wp,wordpress,wp-plugin,fpd,add-search-to-menu,misconfig

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/add-search-to-menu/includes/class-is-admin-public.php"
      - "{{BaseURL}}/wp-content/plugins/add-search-to-menu/includes/class-is-widget.php"
      - "{{BaseURL}}/wp-content/plugins/add-search-to-menu/includes/class-is-index-options.php"
      - "{{BaseURL}}/wp-content/plugins/add-search-to-menu/includes/class-is-index-manager.php"
      - "{{BaseURL}}/wp-content/plugins/add-search-to-menu/includes/class-is-customizer.php"
      - "{{BaseURL}}/wp-content/plugins/add-search-to-menu/includes/compatibility/class-is-tablepress-compat.php"
      - "{{BaseURL}}/wp-content/plugins/add-search-to-menu/admin/class-is-list-table.php"

    stop-at-first-match: true

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "Fatal error", "Uncaught Error") || contains_all(body, "Warning:","failed to open stream")'
          - 'contains(body, "add-search-to-menu")'
          - 'status_code == 200 || status_code == 500'
        condition: and
# digest: 4b0a0048304602210099e2c2fe6c26c888c697642c57b94a2e89377f9788dafc1fd451418bcb78ca1b02210088fbb4abfa4b23d381bce9622502d57b14540938a101cfe0b004044a00eed37b:922c64590222798bb761d5b6d8e72950