id: wp-call-now-button-fpd

info:
  name: WordPress Call Now Button - Full Path Disclosure
  author: DhiyaneshDk
  severity: low
  description: |
    WordPress Plugin Call Now Button files are publicly accessible without ABSPATH protection, exposing sensitive server path information through PHP error messages when accessed directly.
  reference:
    - https://wordpress.org/plugins/call-now-button/
  metadata:
    verified: true
    max-request: 1
    publicwww-query: "/plugins/call-now-button"
  tags: wp,wordpress,wp-plugin,fpd,call-now-button,misconfig

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/call-now-button/call-now-button.php"
      - "{{BaseURL}}/wp-content/plugins/call-now-button/src/renderers/noop/class-nooprenderer.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")'
          - 'status_code == 200 || status_code == 500'
          - 'contains(body, "call-now-button")'
        condition: and
# digest: 4a0a00473045022100db4d629e3e4ec1313c54bb0ac9be30f9bea2a5fdfcdfc713581003f2ca60b08e02203923631c4eacc6aa6c32c068414a81c894455421fbc1f2ecfe9f1026174f1b55:922c64590222798bb761d5b6d8e72950