Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAccess Pi-hole API (unauthenticated if default config)
-
DeliveryInject newline + dhcp-script directive into dns.interface field
-
ExploitEnable DHCP server via API
-
ExecutionWait for DHCP lease request from any network device
-
Persistdnsmasq executes attacker script as root
-
ImpactFull system compromise
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization CRLF sequence sanitization
|
| Exploitation Conditions | Exploitation requires network access to the Pi-hole configuration API (typically HTTP/HTTPS on the web interface). In installations with no admin password set - explicitly described as the default for many deployments - the API is accessible without authentication, enabling remote unauthenticated exploitation (effectively PR:N despite CVSS rating PR:L). In password-protected deployments, the attacker needs valid admin credentials (PR:L). The attacker must inject the malicious configuration, enable the built-in DHCP server feature via the API, and wait for any device on the network to request a DHCP lease, which occurs automatically during normal network operations (device boot, lease renewal cycles). The 31-byte strncpy limit requires compact payloads but is not a practical barrier given example payloads like wlan0\ndhcp-script=/tmp/p fit within constraints. No specific Pi-hole features beyond the configuration API need to be enabled initially, though the DHCP server must be activated as part of the attack chain. |
| Impact | CVSS 8.7 reflects high confidentiality, integrity, and availability impacts with low attack complexity and network attack vector, but the PR:L (low privileges required) rating understates real-world risk in default configurations. The description explicitly states 'no admin password set (the default for many deployments)' exposes the configuration API without credentials, effectively making this PR:N (no privileges required) in common deployments. The 31-byte payload constraint is NOT a practical limitation - the provided example dhcp-script injection fits comfortably. EPSS and KEV data not provided, but the combination of (1) authentication bypass in default configs, (2) persistent configuration injection surviving reboots, (3) remote network vector, and (4) RCE tag suggests high real-world exploitation potential. The requirement for DHCP activity to trigger execution adds a timing dependency but is trivially satisfied in typical network environments where devices regularly renew leases. Vendor-confirmed fix in 6.6.1 and detailed GitHub security advisory (GHSA-9cqv-839p-gpq2) indicate this was responsibly disclosed and patched. Priority should be elevated for internet-exposed Pi-hole instances or those on untrusted network segments, particularly given Pi-hole's role as network infrastructure with privileged access to DNS/DHCP traffic. |
| Exploit ScenarioDerived | A network-adjacent attacker on the same LAN as a default-configured Pi-hole (no admin password) sends HTTP POST requests to the configuration API to inject wlan0\ndhcp-script=/tmp/rce into the dns.interface field, which persists to /etc/pihole/pihole.toml. The attacker then enables the DHCP server via the same API. When any device on the network requests or renews a DHCP lease (a normal automatic event), dnsmasq executes /tmp/rce with root privileges, granting the attacker full control of the Pi-hole host and visibility into all network DNS traffic. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
Remote command execution in Pi-hole FTL versions before 6.6.1 allows network-adjacent attackers with API access to inject malicious dnsmasq directives via unvalidated newline characters in the dns.interface configuration field, achieving arbitrary code execution when DHCP leases are requested. Deployments with no admin password (a documented default configuration) expose the configuration API without authentication, enabling unauthenticated remote exploitation. The Pi-hole project released version 6.6.1 with input validation that strips newline characters, and the fix commit (0c46e4ec7f) replaced validate_stub with validate_str_no_newline.
RemediationAI
Upgrade to Pi-hole FTL version 6.6.1 or later, released by the vendor with commit 0c46e4ec7fe57f762fce261625f2cf5d43806e6d that replaces validate_stub with validate_str_no_newline to strip newline characters from dns.interface input. Download from https://github.com/pi-hole/FTL/releases/tag/v6.6.1 and follow Pi-hole update procedures. If immediate patching is not feasible, set a strong admin password via pihole -a -p to require authentication for the configuration API, which converts the attack from unauthenticated (PR:N) to requiring low privileges (PR:L). Restrict network access to the Pi-hole web interface (typically TCP 80/443) and API to trusted management networks only using firewall rules or reverse proxy authentication - note this breaks legitimate remote administration and may complicate troubleshooting. Audit /etc/pihole/pihole.toml for unexpected newline characters or dhcp-script directives, and review dnsmasq configuration in /etc/dnsmasq.d/ for injected payloads. Disable the DHCP server feature if not required, though this does not prevent configuration injection, only the DHCP-based trigger mechanism. Monitor for unexpected process execution from dnsmasq parent processes.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Pi-hole FTL is the DNS and DHCP engine underlying Pi-hole ad-blocking deployments, which generates dnsmasq configuration files from user-controlled settings stored in /etc/pihole/pihole.toml. The vulnerability stems from CWE-93 (Improper Neutralization of CRLF Sequences in HTTP Headers / Configuration Files). The dns.interface field accepted newline characters without sanitization, allowing injection of arbitrary dnsmasq directives such as dhcp-script=/tmp/malicious_payload within the 31-byte strncpy limit (e.g., wlan0\ndhcp-script=/tmp/p). The dnsmasq dhcp-script directive executes the specified script whenever a DHCP lease is assigned, creating a path from configuration injection to command execution. The FTL 6.6 config validation only verified syntactic correctness of generated dnsmasq configs, so injected valid directives passed checks. The attack chain requires enabling the DHCP server via the same API, making this a multi-step configuration manipulation attack that triggers on network DHCP activity rather than immediate code execution.
Know when Pi Hole gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from Vendor (github) · only source for this CVE.
CVSS VectorVendor: github
Lifecycle Timeline
1DescriptionCVE.org
Pi-hole FTL is the core engine of the Pi-hole network-level advertisement and tracker blocker. In versions before 6.6.1, the dns.interface configuration field in Pi-hole FTL accepted newline characters without validation, allowing an attacker to inject arbitrary directives into the generated dnsmasq configuration file. On installations with no admin password set (the default for many deployments), the configuration API is fully accessible without credentials, allowing a network-adjacent attacker to inject the payload, enable the built-in DHCP server, and achieve arbitrary command execution on the host the next time any device on the network requests a DHCP lease. The injected value is persisted to /etc/pihole/pihole.toml and survives restarts. The strncpy in the code path limits the total interface field to 31 bytes, but payloads such as wlan0\ndhcp-script=/tmp/p fit within this constraint. The dnsmasq config validation introduced in FTL 6.6 only checks syntactic validity, so valid directives injected via newline pass validation successfully. This issue has been fixed in version 6.6.1.
Executive ViewAI
Pi-hole FTL versions before 6.6.1 contain a remote code execution vulnerability in the DNS configuration API that allows unauthenticated attackers to execute arbitrary commands on systems with default credentials. Organizations using Pi-hole for DNS filtering and DHCP services are at immediate risk of complete network compromise if running vulnerable versions without authentication protections.
Vendor-released patch: Pi-hole FTL version 6.6.1. If immediate upgrade is not possible: (1) Set a strong admin password to enforce authentication on the configuration API; (2) Restrict network access to the Pi-hole web interface and API to trusted administrative IP ranges using firewall rules; (3) Disable the configuration API entirely if not required for operational needs; (4) Monitor DNS query logs and dnsmasq configuration files for suspicious newline-injected directives or unexpected DHCP behavior.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Pi-hole versions up to 3.3 contain an authenticated command injection via the domain allowlist functionality. When addin
The Gravity updater in Pi-hole through 4.4 allows an authenticated adversary to upload arbitrary files. Rated high sever
Pi-hole is a Linux network-level advertisement and Internet tracker blocking application. Rated medium severity (CVSS 6.
Pi-hole Web v4.3.2 (aka AdminLTE) allows Remote Code Execution by privileged dashboard users via a crafted DHCP static l
Pi-hole is a DNS sinkhole that protects devices from unwanted content without installing any client-side software. Rated
Pi-hole®'s Web interface (based off of AdminLTE) provides a central location to manage your Pi-hole. Rated high severity
Pi-hole's Web interface provides a central location to manage a Pi-hole instance and review performance statistics. Rate
Pi-hole is a Linux network-level advertisement and Internet tracker blocking application. Rated high severity (CVSS 8.8)
HTTP response splitting in Pi-hole Admin Interface before 6.3 lets unauthenticated remote attackers inject CRLF sequence
An issue was discovered in Pi-Hole through 5.0. Rated high severity (CVSS 7.8), this vulnerability is low attack complex
Pi-hole 4.4 allows a user able to write to /etc/pihole/dns-servers.conf to escalate privileges through command injection
Pi-hole before 6 allows unauthenticated admin/api.php?setTempUnit= calls to change the temperature units of the web dash
EUVD-2026-27498
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB