CVE-2026-33765
Published: 27 March 2026
Description
Pi-hole Admin Interface is a web interface for managing Pi-hole, a network-level ad and internet tracker blocking application. Versions prior to 6.0 have a critical OS Command Injection vulnerability in the savesettings.php file. The application takes the user-controlled $_POST['webtheme'] parameter…
more
and concatenates it directly into a system command executed via PHP's exec() function. Since the input is neither sanitized nor validated before being passed to the shell, an attacker can append arbitrary system commands to the intended pihole command. Furthermore, because the command is executed with sudo privileges, the injected commands will run with elevated (likely root) privileges. Version 6.0 patches the issue.
Mitigating Controls (NIST 800-53 r5)AI
Directly requires validation and sanitization of user-controlled inputs like the 'webtheme' parameter to prevent OS command injection in savesettings.php.
Mandates timely identification, reporting, and patching of flaws like this command injection vulnerability, as addressed in Pi-hole version 6.0.
Enforces least privilege to restrict sudo/root privileges for the PHP exec() process, limiting the scope of damage from injected commands.
Security SummaryAI
CVE-2026-33765 is a critical OS Command Injection vulnerability (CWE-78) in the Pi-hole Admin Interface, the web interface for managing Pi-hole, a network-level ad and internet tracker blocking application. It affects versions prior to 6.0 and resides in the savesettings.php file, where the user-controlled $_POST['webtheme'] parameter is directly concatenated into a system command executed via PHP's exec() function without any sanitization or validation. This allows attackers to append arbitrary system commands to the intended pihole command. The vulnerability carries a CVSS v3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
An unauthenticated remote attacker can exploit this vulnerability by submitting a crafted HTTP POST request to the savesettings.php endpoint with a malicious 'webtheme' value that injects arbitrary OS commands. Because the command executes with sudo privileges, likely as root, successful exploitation grants the attacker full remote code execution with elevated privileges, enabling complete system compromise including data theft, persistence, or further lateral movement.
The official advisory from the Pi-hole web repository at https://github.com/pi-hole/web/security/advisories/GHSA-828h-5x96-rqx7 describes the vulnerability in detail, and version 6.0 of the Pi-hole Admin Interface patches the issue by addressing the insecure command construction.
Details
- CWE(s)
Affected Products
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
CVE enables unauthenticated remote exploitation of a public-facing web application (T1190) via OS command injection, facilitating arbitrary Unix shell command execution as root (T1059.004).