Exploit database

Vulnerability

CVE-2020-11108

Vulnerability details

Score
8.8
Severity
high

CVSS 3.1 · NVD

Vector string

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

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.

CVE Program

Exploit source choices

6 sources
Pi-Hole heisenbergCompensator Blocklist OS Command Execution
MSF-unix--http--pihole_blocklist_execMetasploitPHP / remote

This exploits a command execution in Pi-Hole <= 4.4. A new blocklist is added, and then an update is forced (gravity) to pull in the blocklist content. PHP content is then written to a file within the webroot. Phase 1 writes a sudo pihole command to launch teleporter, effectively running a priv esc. Phase 2 writes our payload to teleporter.php, overwriting, the content. Lastly, the phase 1 PHP file is called in the web root, which launches our payload in teleporter.php with root privileges.

2020-05-10pihole_blocklist_exec.rb
frichetten/cve-2020-11108-poc
GH-da88feb429e7cddd9d1a9c618988223dGitHubUnofficial GitHub source

PoCs for CVE-2020-11108; an RCE and priv esc in Pi-hole

2020-04-043 files · 27 stars