high

CVE-2026-52801

Go · gogs.io/gogs

Summary

Gogs has the ability to import local repositories via Mirror Settings

Severity
high
CVSS
8.1
EPSS
0.6% (p45)
CWE
CWE-20
Also known as
GHSA-wv27-2vqp-j7g5
Published
2026-06-23
Updated
2026-06-23

Advisory details

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. image

Here is the function implementation of the Mirror Settings without any validation. image

PoC

The New Migration feature correctly blocked my attempt to import a local repository. image

But if I create a normal migration with a valid repository. image

Then, I could use the Mirror Settings feature under the Repository Settings sync a local repository. image

Here is the result after the sync. image

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.

References

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.