GitHub Advisoryadvisory · Go
GHSA-wv27-2vqp-j7g5 Gogs has the ability to import local repositories via Mirror Settings
HIGH
Official page ↗
- Aliases
- CVE-2026-52801
- Ecosystem
- Go
- Packages
- gogs.io/gogs
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
- Weaknesses
- CWE-20
- Reviewed
- 2026-06-23
Affected packages
• Go gogs.io/gogs: < 0.14.3 → fixed in 0.14.3
Description
Summary
The Gogs Mirror Settings functionality provide an alternative way from the well protected New Migration functionality for any authenticated users to import local repositories. This issue stems from a lack of validation of SaveAddress function.
Details
Here is the function implementation of the secure New Migration functionality.
Here is the function implementation of the Mirror Settings without any validation.
PoC
The New Migration feature correctly blocked my attempt to import a local repository.
But if I create a normal migration with a valid repository.
Then, I could use the Mirror Settings feature under the Repository Settings sync a local repository.
Here is the result after the sync.
Impact
Users can import local repositories from the server's filesystem, which allows accessing any repository the git user has access to. There is also a potential issue of blind SSRF.
Related
Alias · CVE (1)
- CVE-2026-52801 Gogs is an open source self-hosted Git service. vulnerability
Weakness · CWE (1)
- CWE-20 Improper Input Validation weakness
References
- https://github.com/gogs/gogs/security/advisories/GHSA-wv27-2vqp-j7g5 web
- https://nvd.nist.gov/vuln/detail/CVE-2026-52801 advisory
- https://github.com/gogs/gogs/pull/8225 web
- https://github.com/gogs/gogs/commit/11e19f28b5c82466fd1689c94344ef4313ee986c web
- https://github.com/gogs/gogs package
- https://github.com/gogs/gogs/releases/tag/v0.14.3 web