Read the docs

Pi-hole root scripts follow symlinks, overwriting or deleting files

Priority MEDIUM 47CWE-59Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
Required
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · GHSA-5w4v-f65m-323f. Fix status from GitHub.

Summary

Pi-hole before 6.6 has a link resolution flaw (CWE-59) in root-run scripts that trust files and paths in /etc/pihole, which the pihole user controls. An attacker who already runs code as the pihole user can make root overwrite or truncate arbitrary files and change their modes, or delete arbitrary files and directories, when an administrator runs pihole checkout, an update or install, or pihole uninstall. The attack needs local access with low privileges and an administrator to run the affected command.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

Description from the GitHub advisory

### Summary `/etc/pihole` and `pihole.toml` are controlled by the `pihole` user. Three root-run code paths trust them, and are not covered by GHSA-wp3p-45h3-2v82 or GHSA-jvg9-fm8x-2jqq: 1. **`macvendor.db` download** (`automated install/basic-install.sh`, `FTLinstall`). During install, update and repair, root runs `curl -sSL ... -o /etc/pihole/macvendor.db`. This follows a symlink planted at that path and overwrites the target with the download. 2. **`ftlbranch`** (`advanced/Scripts/piholeCheckout.sh`). `pihole checkout` runs as root and does `echo ... > /etc/pihole/ftlbranch` and `chmod 644 /etc/pihole/ftlbranch` in three places. Both follow a planted symlink, so root truncates or overwrites the target with a branch name and makes it world-readable. 3. **Uninstaller** (`automated install/uninstall.sh`). Root reads `webserver.paths.webroot`/`webhome`, `files.database`, `files.gravity` and `files.macvendor` from `pihole.toml` and runs `rm -rf`/`rm -f` on them. A `pihole`-controlled config can direct root to delete arbitrary files or directory trees. Same root cause and foothold as GHSA-wp3p-45h3-2v82 and GHSA-xch2-4qxw-g5vj. Found by static review; verified on v6.5 (commit `f503a65`) and unchanged on `development` at `4b33f6e4`. ### Preconditions - The attacker already runs code as the `pihole` user (e.g. after a compromise of `pihole-FTL`). - An administrator later runs the affected command (`pihole -up`/`-r` or a fresh install for 1, `pihole checkout` for 2, `pihole uninstall` for 3). - `fs.protected_symlinks` does not help: `/etc/pihole` is not a sticky world-writable directory. ### Impact 1 and 2: root overwrites or truncates an arbitrary file and changes its mode. 3: root deletes arbitrary files or directories. ### Remediation - 1: download `macvendor.db` as the `pihole` user. This shares its fix with GHSA-wp3p-45h3-2v82. - 2: write `ftlbranch` as the `pihole` user. - 3: never delete a config-supplied path as root unless it is the default location, or is a regular file (not a symlink) inside a directory the uninstaller is removing anyway.

Why it matters now

Fix Fixed pi-hole: 6.6

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—pi-hole<= 6.56.6Patch availableGHSA-5w4v-f65m-323f
  • pi-hole Vendor— Affected <= 6.5 Fixed in 6.6 Patch available GHSA-5w4v-f65m-323f

Remediation

Upgrade pi-hole to version 6.6, where the flaw is fixed.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

  • Fix · GHSA-5w4v-f65m-323f pi-hole Fixed in 6.6 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from GHSA-5w4v-f65m-323f

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences