PT-2026-51623 · Gogs · Gogs

CVE-2026-52805

·

Published

2026-06-23

·

Updated

2026-07-30

CVSS v3.1

8.7

High

VectorAV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Name of the Vulnerable Software and Affected Versions Gogs (affected versions not specified)
Description A Server-Side Request Forgery (SSRF) issue exists in the repository migration functionality. The application validates the hostname of the initially submitted URL against a blocklist of local and private-network addresses using the ParseRemoteAddr() function in internal/form/repo.go. However, the migration process utilizes git clone --mirror in internal/database/repo.go, which follows HTTP redirects without revalidating the final target. An authenticated user can provide a public URL that redirects to a blocked internal endpoint, such as 127.0.0.1, allowing the import of internal repository contents into an attacker-controlled repository. This can lead to the theft of source code and secrets from internal repositories served over HTTP or the scanning of internal network services via the '/api/v1/repos/migrate' endpoint using the clone addr parameter.
Recommendations At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

SSRF

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-52805
GHSA-G2F5-GJR4-QJVM
GO-2026-5387
OPENSUSE-SU-2026:21483-1

Affected Products

Gogs