id: wp-smushit-fpd

info:
  name: WP Smushit - Full Path Disclosure
  author: theamanrawat,DhiyaneshDk
  severity: low
  description: |
    Smushit WordPress plugin contains a full path disclosure vulnerability due to improper access restrictions in its source files, allowing unauthenticated attackers to retrieve full server paths and aiding exploitation.
  impact: |
    Attackers can obtain sever file paths, aiding in further exploitation of the website.
  reference:
    - https://wordpress.org/plugins/wp-smushit/
  metadata:
    verified: true
    max-requests: 1
    publicwww-query: "/wp-content/plugins/wp-smushit/"
  tags: debug,wordpress,wp,wp-plugin,wp-smushit,fpd

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/wp-smushit/core/cdn/class-cdn-controller.php"
      - "{{BaseURL}}/wp-content/plugins/wp-smushit/wp-smush.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, "wp-smushit")'
        condition: and
# digest: 490a0046304402203a5699b66bf5f2cb8aa2017012dda17067dfd5dd72277f6ed2b115c9772e26050220255c45b2261e5aa3abd768a599c342da1e017241fca4add4b82240012ddd4fba:922c64590222798bb761d5b6d8e72950