Description
The Gravity updater in Pi-hole through 4.4 allows an authenticated adversary to upload arbitrary files. This can be abused for Remote Code Execution by writing to a PHP file in the web directory. (Also, it can be used in conjunction with the sudo rule for the www-data user to escalate privileges to root.) The code error is in gravity_DownloadBlocklistFromUrl in gravity.sh.
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 heisenbergCompensator Blocklist OS Command Execution
exploit/unix/http/pihole_blocklist_exec
Exploit-DB 4
- Pi-hole 4.4.0 - Remote Code Execution (Authenticated) EDB-48519 · webapps · May 26, 2020 · verified
- Pi-Hole - heisenbergCompensator Blocklist OS Command Execution (Metasploit) EDB-48491 · remote · May 19, 2020 · verified
- Pi-hole < 4.4 - Authenticated Remote Code Execution EDB-48442 · webapps · May 10, 2020
- Pi-hole < 4.4 - Authenticated Remote Code Execution / Privileges Escalation EDB-48443 · webapps · May 10, 2020
GitHub 1 repository
-
Frichetten/CVE-2020-11108-PoC ★ 27 · Apr 4, 2020
PoCs for CVE-2020-11108; an RCE and priv esc in Pi-hole
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- https://frichetten.com/blog/cve-2020-11108-pihole-rce/
- https://github.com/Frichetten/CVE-2020-11108-PoC
- http://packetstormsecurity.com/files/157623/Pi-hole-4.4-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/157624/Pi-hole-4.4-Remote-Code-Execution-Privilege-Escalation.html
- http://packetstormsecurity.com/files/157748/Pi-Hole-heisenbergCompensator-Blocklist-OS-Command-Execution.html
- http://packetstormsecurity.com/files/157839/Pi-hole-4.4.0-Remote-Code-Execution.html