CVE-2026-33765: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in pi-hole web
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 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.
AI Analysis
Technical Summary
Pi-hole is a popular network-level ad and tracker blocking application with a web-based admin interface. In versions prior to 6.0, the savesettings.php script processes a POST parameter named 'webtheme' by directly concatenating its value into a shell command executed via PHP's exec() function. This practice constitutes improper neutralization of special elements (CWE-78), enabling OS Command Injection. Since the input is neither sanitized nor validated, an attacker can append arbitrary shell commands to the intended Pi-hole command. Critically, the command executes with sudo privileges, granting root-level access to the attacker. The vulnerability requires no authentication or user interaction and can be exploited remotely by sending crafted HTTP POST requests to the Pi-hole admin interface. The CVSS 4.0 score of 8.9 reflects the high impact on confidentiality, integrity, and availability, combined with ease of exploitation and no required privileges. Although no known exploits are reported in the wild yet, the severity and simplicity of exploitation make this a significant threat. The issue is resolved in Pi-hole version 6.0 by properly sanitizing and validating user input before command execution.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary commands with root privileges on the Pi-hole server. This can lead to full system compromise, including data theft, service disruption, installation of persistent malware, lateral movement within the network, and complete loss of confidentiality, integrity, and availability of the affected system. Since Pi-hole often runs on home or small business networks as a DNS-level filter, compromise can also undermine network security and privacy for all connected devices. The vulnerability's remote, unauthenticated nature increases the risk of widespread exploitation, potentially affecting numerous deployments worldwide before patching occurs.
Mitigation Recommendations
1. Immediately upgrade all Pi-hole installations to version 6.0 or later, where the vulnerability is patched. 2. If upgrading is not immediately possible, restrict access to the Pi-hole admin interface using network-level controls such as firewall rules or VPNs to limit exposure to trusted users only. 3. Monitor network traffic and system logs for unusual POST requests targeting savesettings.php or suspicious command execution patterns. 4. Employ web application firewalls (WAFs) with custom rules to detect and block command injection attempts targeting the 'webtheme' parameter. 5. Regularly audit and harden server configurations to minimize the impact of potential compromises, including running Pi-hole with the least privileges necessary and isolating it within segmented network zones. 6. Educate administrators about the risks of command injection and the importance of timely patching and secure configuration.
Affected Countries
United States, Germany, United Kingdom, Canada, Australia, France, Netherlands, Japan, India, Brazil
CVE-2026-33765: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in pi-hole web
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 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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Pi-hole is a popular network-level ad and tracker blocking application with a web-based admin interface. In versions prior to 6.0, the savesettings.php script processes a POST parameter named 'webtheme' by directly concatenating its value into a shell command executed via PHP's exec() function. This practice constitutes improper neutralization of special elements (CWE-78), enabling OS Command Injection. Since the input is neither sanitized nor validated, an attacker can append arbitrary shell commands to the intended Pi-hole command. Critically, the command executes with sudo privileges, granting root-level access to the attacker. The vulnerability requires no authentication or user interaction and can be exploited remotely by sending crafted HTTP POST requests to the Pi-hole admin interface. The CVSS 4.0 score of 8.9 reflects the high impact on confidentiality, integrity, and availability, combined with ease of exploitation and no required privileges. Although no known exploits are reported in the wild yet, the severity and simplicity of exploitation make this a significant threat. The issue is resolved in Pi-hole version 6.0 by properly sanitizing and validating user input before command execution.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary commands with root privileges on the Pi-hole server. This can lead to full system compromise, including data theft, service disruption, installation of persistent malware, lateral movement within the network, and complete loss of confidentiality, integrity, and availability of the affected system. Since Pi-hole often runs on home or small business networks as a DNS-level filter, compromise can also undermine network security and privacy for all connected devices. The vulnerability's remote, unauthenticated nature increases the risk of widespread exploitation, potentially affecting numerous deployments worldwide before patching occurs.
Mitigation Recommendations
1. Immediately upgrade all Pi-hole installations to version 6.0 or later, where the vulnerability is patched. 2. If upgrading is not immediately possible, restrict access to the Pi-hole admin interface using network-level controls such as firewall rules or VPNs to limit exposure to trusted users only. 3. Monitor network traffic and system logs for unusual POST requests targeting savesettings.php or suspicious command execution patterns. 4. Employ web application firewalls (WAFs) with custom rules to detect and block command injection attempts targeting the 'webtheme' parameter. 5. Regularly audit and harden server configurations to minimize the impact of potential compromises, including running Pi-hole with the least privileges necessary and isolating it within segmented network zones. 6. Educate administrators about the risks of command injection and the importance of timely patching and secure configuration.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-23T18:30:14.126Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69c6e1b93c064ed76febd417
Added to database: 3/27/2026, 7:59:53 PM
Last enriched: 3/27/2026, 8:15:02 PM
Last updated: 3/27/2026, 11:39:58 PM
Views: 8
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.