CVE-2024-42327

9.9 CRITICAL

📋 TL;DR

This CVE describes an SQL injection vulnerability in Zabbix's CUser class that allows non-admin users with API access to execute arbitrary SQL queries. Any Zabbix installation with users having default User role or other roles granting API access is affected. The vulnerability has a critical CVSS score of 9.9 due to the potential for complete system compromise.

💻 Affected Systems

Products:
  • Zabbix
Versions: Zabbix 7.0.0alpha1 to 7.0.0beta2, 7.0.0rc1 to 7.0.0rc2, 6.0.0alpha1 to 6.0.28, 6.4.0alpha1 to 6.4.16, 5.0.0alpha1 to 5.0.46
Operating Systems: All platforms running affected Zabbix versions
Default Config Vulnerable: ⚠️ Yes
Notes: All installations with users having API access are vulnerable, including default User role configurations.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data exfiltration, privilege escalation to admin, and potential remote code execution on the underlying server.

🟠

Likely Case

Unauthorized data access, privilege escalation within Zabbix, and potential lateral movement to other systems.

🟢

If Mitigated

Limited impact if proper network segmentation, least privilege access, and monitoring are in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires authenticated API access but is straightforward once access is obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Zabbix 7.0.0, 6.0.29, 6.4.17, 5.0.47

Vendor Advisory: https://support.zabbix.com/browse/ZBX-25623

Restart Required: Yes

Instructions:

1. Backup your Zabbix database and configuration. 2. Download the patched version from Zabbix website. 3. Follow Zabbix upgrade documentation for your specific version. 4. Restart Zabbix services after upgrade.

🔧 Temporary Workarounds

Restrict API Access

all

Remove API access from non-admin users until patching is complete

UPDATE users SET api_access=0 WHERE role_id NOT IN (SELECT roleid FROM role WHERE name='Admin')

Network Segmentation

linux

Restrict access to Zabbix frontend to trusted networks only

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

🧯 If You Can't Patch

  • Implement strict network access controls to limit Zabbix frontend access to authorized users only
  • Enable detailed SQL query logging and monitor for suspicious database activity

🔍 How to Verify

Check if Vulnerable:

Check Zabbix version via web interface or command: zabbix_server --version

Check Version:

zabbix_server --version 2>/dev/null || grep ZABBIX_VERSION /usr/share/zabbix/include/defines.inc.php

Verify Fix Applied:

Verify version is 7.0.0+, 6.0.29+, 6.4.17+, or 5.0.47+ and test API access with non-admin user

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in Zabbix logs
  • Multiple failed login attempts followed by API access
  • Database error messages containing SQL syntax

Network Indicators:

  • Unusual API call patterns from non-admin users
  • Large data transfers from Zabbix database

SIEM Query:

source="zabbix" AND ("SQL syntax" OR "database error" OR "CUser.get" AND NOT user="Admin")

🔗 References

📤 Share & Export