All vulnerabilities

Servers and applications

CVE-2026-52805

Migration Redirect Bypass Leads to Internal Repository Theft

Severity
High 8.7
Published
19 Jun 2026
Last changed
3 Nov 2026
Added to UpHeron
3 Nov 2026
Fixed in
0.14.3
Exploit chance
0.4% in the next 30 daysHigher than 33% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Server-side request forgery (CWE-918)
Attack
Over the network · Needs a user account · Needs someone to click or open something
Attacker can
Read data · Change data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Also known as
GHSA-g2f5-gjr4-qjvm
Sources
CVE Program, Project advisories (GitHub)

Description

A Server-Side Request Forgery (SSRF) vulnerability exists in the repository migration functionality. The application validates only the initially submitted URL hostname, but git clone --mirror follows HTTP redirects. An authenticated user can submit a public URL that redirects to a blocked internal endpoint (e.g., 127.0.0.1), importing the internal repository's contents into an attacker-controlled repository.

The vulnerability is located in internal/form/repo.go. ParseRemoteAddr() validates the clone address hostname against a blocklist of local and private-network addresses. However, the actual migration is performed by git clone --mirror in internal/database/repo.go, which follows HTTP redirects without revalidation:

  • Attacker submits http://attacker.example/redirect.git — passes validation (public hostname).
  • Attacker's server responds with 302 redirect to http://127.0.0.1:18081/victim/private.git.
  • Git follows the redirect and clones the internal repository.
From gogs/gogs's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
GogsServers and applications · cna:gogs|gogs
  • Every version before 0.14.3
GogsServers and applications · github:gogs/gogs
  • Every version before 0.14.3

About Gogs

free forge based on Git written in Go

From Wikidata, CC0 1.0.
Docker Hub pulls
94,040,857Docker Hub, 15 Nov 2026
GitHub stars
47,939GitHub, 15 Nov 2026
Forks
5,082GitHub, 15 Nov 2026
Latest release
v0.14.4GitHub, 15 Nov 2026
Released
12 Nov 2026GitHub
Developer
FLOSS contributorWikidata
License
Expat licenseWikidata
Written in
Go, Cascading Style Sheets, JavaScriptWikidata
First released
11 Feb 2014Wikidata
First published on GitHub
12 Feb 2014GitHub

References