gogs.io/gogs
Affected
- introduced
0, fixed0.13.4(semver)
Fixed versions
0.13.4
Fix
- Fixed version
0.13.4go get gogs.io/[email protected]
Advisory
Also known as: CVE-2026-23633, GO-2026-4453
Gogs has arbitrary file read/write via Path Traversal in Git hook editing
Vulnerability Description
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.
As a Result:
---
Attack Prerequisites
---
Attack Scenario
../ is supplied in :name, fully URL-encoded using %2fcustom_hooks/../../... without validation---
Potential Impact
app.ini, databases, logs, environment variables, etc.SECRET_KEY and database credentials may allow token forging or further compromiseMedium Basis: The source's own band: MODERATE
0, fixed 0.13.4 (semver)0.13.4
0.13.4go get gogs.io/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0