SQL injection in Pi-hole - #VU166837

 

SQL injection in Pi-hole - #VU166837

Published: November 18, 2026


Vulnerability identifier: #VU166837
CSH Severity: Low
CVSS v4: 8.6 [CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: N/A
CWE-ID: CWE-89
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote privileged user to execute arbitrary SQL statements and operating system commands as the pihole user.

The vulnerability exists due to improper escaping in Pi-hole Core's gravity.sh when substituting files.gravity into an ATTACH DATABASE statement in gravity_copy.sql. A remote privileged user can configure files.gravity through the API with a single quote (') and appended SQL statements invoking edit() and thereby system() to execute arbitrary commands.


Affected software

Pi-hole

Remediation

Install security update from vendor's website.

Pi-hole - update to 6.6

External References

Related Security Bulletins