CVE-2026-145797
Received Received - Intake

SQL Injection in Pi-hole FTL Leading to OS Command Execution

Vulnerability report for CVE-2026-145797, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-12-06

Last updated on: 2026-12-06

Assigner: VulnCheck

Description

Pi-hole FTL 6.8 with Pi-hole Core before 6.6 contains an SQL injection vulnerability that allows authenticated admins to execute OS commands as the pihole user via the files.gravity setting. Attackers can set a single-quoted payload through PATCH /api/config and trigger gravity, injecting SQL that calls the sqlite3 edit() function to run system commands.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-12-06
Last Modified
2026-12-06
Generated
2026-12-06
AI Q&A
2026-12-06
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
pi-hole FTL From 6.8 (inc) to 6.9 (exc)
pi-hole pi-hole From 0 (inc) to 6.6 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-89 The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability allows an authenticated Pi-hole admin to execute OS commands as the restricted 'pihole' user by injecting malicious SQL via the API, bypassing intended security boundaries in the gravity database processing.

Detection Guidance

Check FTL and Core versions to confirm exposure. On Linux, run: `pihole-FTL --version` and `pihole version`. If FTL ≀6.8 and Core <6.6, the system is vulnerable.

Review API access logs for unexpected PATCH requests to /api/config targeting the files.gravity setting. Look for single-quoted payloads in the request body.

Inspect gravity.sh for unescaped path handling: `grep -n "ATTACH DATABASE" /etc/pihole/gravity.sh`; presence of direct string interpolation indicates exposure.

Impact Analysis

An attacker with admin write access could run arbitrary commands as the 'pihole' user, potentially modifying DNS responses, exfiltrating data, or disrupting Pi-hole services.

Compliance Impact

If the Pi-hole instance processes sensitive DNS data (e.g., user queries or logs), this vulnerability could lead to unauthorised access or disclosure, potentially impacting data protection measures under applicable regulations.

Mitigation Strategies

Upgrade Pi-hole FTL to v6.9 or later and Pi-hole Core to v6.6 or later immediately using your package manager (e.g., `pihole updatechecker local`).

Temporarily restrict write access to the Pi-hole API to admin-only users until updates are applied.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-145797. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...