Git commit hash exposed to all visitors in footer #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
src/html/footer.phpreads the current git commit hash from.git/refs/heads/masterand renders it in every page footer as a hyperlink to the public GitHub commit:Location
src/html/footer.php, lines 4–5autoload.php, lines 37–45 (get_current_git_commit())Risk
The displayed commit hash reveals the exact version of the code running in production. An attacker can cross-reference this against the public repository to identify known vulnerabilities fixed in later commits, understand the exact codebase, and narrow their attack surface research significantly. It also confirms the deployment model (git-pull to web root), which correlates with the
.gitdirectory exposure risk.Suggested fix direction
Remove the commit hash display from the public-facing footer. If version tracking is needed, limit it to admin or status pages with access control, or expose it only in an internal header (
X-App-Version) not visible in the browser.Severity
minor
Found by
Automated audit by Claude Code