Loading advisory.
Loading advisory.
Gogs has arbitrary file read/write via Path Traversal in Git hook editing
In the endpoint:
Published 2026-02-06 17:46 UTC · Modified 2026-02-19 20:41 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| gogs.io/gogs | Go | < 0.13.4 all versions | 0.13.4 | go get gogs.io/gogs@v0.13.4 |
In the endpoint:
/username/reponame/settings/hooks/git/:namethe :name parameter:
Is URL-decoded by macaron routing, allowing decoded slashes (/)
Is then passed directly to:
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.
GET: Arbitrary file contents are displayed in the hook edit page textarea (Local File Inclusion).
POST: Existing files can be overwritten with attacker-controlled content (Arbitrary File Write).
The attacker is an authenticated user
The attacker has Admin or higher privileges on the target repository
The attacker has the AllowGitHook permission (or is a site administrator)
The target file is readable/writable by the Gogs process OS permissions
An attacker (with AllowGitHook + repository Admin privileges) accesses the Git hook edit URL
A path containing ../ is supplied in :name, fully URL-encoded using %2f
The server resolves custom_hooks/../../... without validation
Arbitrary file contents are displayed and existing files can be overwritten
Sensitive information disclosure: app.ini, databases, logs, environment variables, etc.
Configuration or data tampering: Overwriting existing files
Secondary impact: Extraction of SECRET_KEY and database credentials may allow token forging or further compromise
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.005 on 2026-11-24 to 0.006 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.005 | first score | v2026.06.15 |
| 2026-11-26 | 0.006 | 0.005 | v2026.06.15 |