Zabbix: SQL injection in API sortfield parameter (CVE-2026-23921)
A time-based blind SQL injection vulnerability in Zabbix API (CVE-2026-23921) allows authenticated attackers to exfiltrate database data via malicious input to the sortfield and groupBy parameters.
CVE search metadata
CVE search record: CVE-2026-23921. Severity: high. CVSS: 8.8. EPSS: 4.10%. KEV: no. Product: Zabbix (< 7.0.22), Zabbix (< 7.2.15), Zabbix (< 7.4.6). Brief: Zabbix: SQL injection in API sortfield parameter (CVE-2026-23921). Brief link: https://feed.craftedsignal.io/briefs/2026-10-zabbix-sql-injection/
Triage facts
Revision 1- Applicability
- Zabbix (< 7.0.22), Zabbix (< 7.2.15) +1
- Evidence
- Unknown
- Severity
- High
- Action
- Elevated
- Sources
- 2 public sources
- Freshness
- Revision 1Oct 28, 16:04 UTC
- Detection
- 1 rule
- Vulnerabilities
- 1 CVE
- Source quality
- B2Likely
CVE-2026-23921 is a time-based blind SQL injection vulnerability in the Zabbix API. The flaw exists in CApiService::applyQuerySortOptions() where a failure to properly validate the sortfield parameter when combined with a user-supplied groupBy array allows for SQL injection. Attackers can provide a malicious payload that reaches the ORDER BY clause of SQL queries without sanitization. The vulnerability affects Zabbix versions prior to 7.0.22, 7.2.15, and 7.4.6. Public exploit code is available.
Attack Chain
- Attacker authenticates to the Zabbix API using a valid user account.
- Attacker invokes an API method such as
host.get,trigger.get, oritem.get. - Attacker injects a payload into the
groupByparameter and thesortfieldparameter. - The
zbx_array_merge()function merges the attacker-controlledgroupByinto the options array. CApiService::applyQuerySortOptions()validates thesortfieldusing the attacker-controlledgroupByinput, effectively bypassing the whitelist.- The
createSelectQueryFromParts()function generates the final SQL query containing the unsanitizedORDER BYclause. - The database executes the injected SQL, allowing for time-based data exfiltration via
pg_sleep()or equivalent functions.
Impact
Successful exploitation allows for blind, time-based data exfiltration from the underlying database (PostgreSQL or MySQL). An attacker must have valid API credentials to reach the vulnerable code path.
Recommendation
- Upgrade Zabbix immediately to version 7.0.22, 7.2.15, 7.4.6, or higher to receive the patch that replaces
array_mergewitharray_intersectfor input validation. - Audit Zabbix API access logs for anomalous
sortfieldorgroupByusage patterns. - Restrict access to the Zabbix API to authorized IP addresses or internal networks.
Immediate actions
Patch all Zabbix instances to version 7.0.22, 7.2.15, 7.4.6, or higher.
Threat Hunt
Review Zabbix access logs for API calls containing SQL injection strings in parameters
Data: webserver access logs
Mitigations
Upgrade Zabbix to 7.0.22 or later
CVE-2026-23921
Detection coverage 1
Detect CVE-2026-23921 Exploitation - SQL Injection via Zabbix API
highDetects attempts to exploit CVE-2026-23921 by identifying unusual characters in Zabbix API sortfield or groupBy parameters.
Detection queries are available on the platform. Get full rules →