id: wp-sg-cachepress-fpd

info:
  name: WordPress Plugin SG Optimizer - Full Path Disclosure
  author: DhiyaneshDk
  severity: low
  description: |
    WordPress Plugin SG Optimizer 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/sg-cachepress/
  metadata:
    max-request: 1
    verified: true
    shodan-query: html:"/plugins/sg-cachepress/"
  tags: debug,wordpress,fpd,vuln,sg-cachepress,wp-plugin

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/sg-cachepress/core/File_Cacher/File_Cacher.php"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "plugins/sg-cachepress")'
          - 'contains_all(body, "Fatal error", "Uncaught Error:")'
        condition: and
# digest: 4a0a00473045022100d29d3a13bc0af83f94062d6caa1885e3ff2b78932a7771ebb9a42def56856a82022028a835f6c8e848d158d4cd4cd456e3a912769801214d49e0a7658c552d30948a:922c64590222798bb761d5b6d8e72950