Skip to content

Gogs has the ability to import local repositories via Mirror Settings

High severity GitHub Reviewed Published Jun 19, 2026 in gogs/gogs • Updated Jun 23, 2026

Package

gomod gogs.io/gogs (Go)

Affected versions

< 0.14.3

Patched versions

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

@unknwon unknwon published to gogs/gogs Jun 19, 2026
Published to the GitHub Advisory Database Jun 23, 2026
Reviewed Jun 23, 2026
Last updated Jun 23, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

EPSS score

Weaknesses

Improper Input Validation

The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. Learn more on MITRE.

CVE ID

CVE-2026-52801

GHSA ID

GHSA-wv27-2vqp-j7g5

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.