CVE-2023-26037

8.9 HIGH

📋 TL;DR

CVE-2023-26037 is an SQL injection vulnerability in ZoneMinder CCTV software that allows attackers to execute arbitrary SQL commands through the minTime and maxTime parameters. This affects all ZoneMinder installations prior to versions 1.36.33 and 1.37.33. Attackers could potentially access, modify, or delete surveillance data and gain unauthorized system access.

💻 Affected Systems

Products:
  • ZoneMinder
Versions: All versions prior to 1.36.33 and 1.37.33
Operating Systems: Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all ZoneMinder deployments regardless of configuration if using vulnerable versions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the ZoneMinder database leading to data theft, surveillance footage manipulation, and potential lateral movement to other systems.

🟠

Likely Case

Unauthorized access to surveillance footage, camera configuration changes, and potential data exfiltration.

🟢

If Mitigated

Limited impact if proper network segmentation and database permissions are configured, though SQL injection remains possible.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

SQL injection requires authentication to ZoneMinder interface, but exploitation is straightforward once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.36.33 or 1.37.33

Vendor Advisory: https://github.com/ZoneMinder/zoneminder/security/advisories/GHSA-65jp-2hj3-3733

Restart Required: Yes

Instructions:

1. Backup ZoneMinder configuration and database. 2. Update ZoneMinder to version 1.36.33 or 1.37.33 using your distribution's package manager or from source. 3. Restart ZoneMinder service: sudo systemctl restart zoneminder. 4. Verify the update was successful.

🔧 Temporary Workarounds

Input Validation Web Application Firewall Rule

all

Implement WAF rules to block SQL injection patterns in minTime and maxTime parameters

Network Segmentation

linux

Restrict access to ZoneMinder web interface to trusted networks only

sudo iptables -A INPUT -p tcp --dport 80 -s TRUSTED_NETWORK -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 443 -s TRUSTED_NETWORK -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 80 -j DROP
sudo iptables -A INPUT -p tcp --dport 443 -j DROP

🧯 If You Can't Patch

  • Implement strict network access controls to limit ZoneMinder web interface access to authorized users only.
  • Deploy a web application firewall with SQL injection detection rules specifically for minTime and maxTime parameters.

🔍 How to Verify

Check if Vulnerable:

Check ZoneMinder version via web interface or command line: grep ZM_VERSION /usr/share/zoneminder/includes/version.php

Check Version:

grep ZM_VERSION /usr/share/zoneminder/includes/version.php

Verify Fix Applied:

Confirm version is 1.36.33 or higher (1.36.x branch) or 1.37.33 or higher (1.37.x branch)

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts followed by successful authentication and SQL injection patterns
  • Web server logs showing SQL syntax in minTime or maxTime parameters

Network Indicators:

  • SQL injection patterns in HTTP requests to ZoneMinder endpoints
  • Unusual database connections from ZoneMinder application server

SIEM Query:

source="web_server_logs" AND (uri="*minTime*" OR uri="*maxTime*") AND (query="*SELECT*" OR query="*UNION*" OR query="*INSERT*" OR query="*DELETE*")

🔗 References

📤 Share & Export