In the endpoint:
/username/reponame/settings/hooks/git/:name
the :name parameter:
/)git.Repository.Hook("custom_hooks", name)
which internally resolves the path as:
filepath.Join(repoPath, "custom_hooks", name)
Because no path sanitization is applied, supplying ../ sequences allows access to arbitrary paths outside the repository.
../ is supplied in :name, fully URL-encoded using %2fcustom_hooks/../../... without validationapp.ini, databases, logs, environment variables, etc.SECRET_KEY and database credentials may allow token forging or further compromise{
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-06T18:14:51Z",
"nvd_published_at": "2026-02-06T18:15:56Z",
"severity": "MODERATE"
}