Description
An authenticated command injection vulnerability exists in Pi-hole versions up to 3.3. When adding a domain to the allowlist via the web interface, the domain parameter is not properly sanitized, allowing an attacker to append OS commands to the domain string. These commands are executed on the underlying operating system with the privileges of the Pi-hole service user.
This behavior was present in the legacy AdminLTE interface and has since been patched in later versions.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Pi-hole | Web | ≤ 3.3 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Pi-Hole Whitelist OS Command Execution
exploit/unix/http/pihole_whitelist_exec
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/unix/http/pihole_whitelist_exec.rb exploit
- https://pi-hole.net/ product
- Web 4.0 Release Notes vendor-advisory patch release-notes
- https://pulsesecurity.co.nz/advisories/pihole-v3.3-vulns third-party-advisory exploit
- https://vulncheck.com/advisories/pihole-adminlte-whitelist-rce third-party-advisory