요약
- CVE-2026-23633은(는) gogs.io/gogs, gogs (gogs)에 영향을 주는 보통 (CVSS 6.5) 취약점입니다.
- 향후 30일 내 악용 확률(EPSS): 0.51%, 전체 취약점의 43.8%보다 높음.
- 조치: 0.13.4 이상으로 업데이트하세요.
| Package | Affected versions | Patched versions |
|---|
| gogs.io/gogs Go | < 0.13.4all versions
| 0.13.4
|
| gogs | < 0.13.4
| 0.13.4
|
Description
Vulnerability Description
In the endpoint:
/username/reponame/settings/hooks/git/:name
the :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.
As a Result:
- 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).
Attack Prerequisites
- 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
Attack Scenario
- 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
Potential Impact
- 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
NVD description
Gogs is an open source self-hosted Git service. In version 0.13.3 and prior, there is an arbitrary file read/write via path traversal in Git hook editing. This issue has been patched in versions 0.13.4 and 0.14.0+dev.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free