gogs.io/gogs

CVE-2026-52805

CVE-2026-52805 is a high-severity security vulnerability in gogs.io/gogs (go), affecting versions < 0.14.3. It is fixed in 0.14.3.

Key facts
CVSS score
8.7
High
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
gogs.io/gogs
Fixed in
0.14.3
Disclosed
2026

Summary

Migration URL validation bypass via HTTP redirect to blocked internal endpoints Summary 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. Vulnerability Details 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. Gogs imports the cloned contents into the attacker's new repository. The root cause is that Gogs validates only the initial URL and does not revalidate the final redirect target. Impact This vulnerability bypasses the intended localhost/private-network migration restriction. Any authenticated user who can migrate repositories can import contents from internal Git endpoints reachable from the Gogs server. This allows attackers to: Steal source code and secrets from internal repositories served over HTTP. Scan internal network services via the migration endpoint. Reproduction Steps Prerequisites: a Gogs instance, an attacker account that can create repositories. Start a local HTTP Git server with a test repository on 127.0.0.1:18081. Start a redirect server that responds to any request with a 302 redirect to http://127.0.0.1:18081/victim/private.git. Verify the direct localhost URL is blocked: Result: rejected as blocked local address. Submit a public-looking URL that redirects to the blocked endpoint: Result: migration succeeds. The new repository contains the internal repository's contents.

Impact

Severity and exposure

CVE-2026-52805 has a CVSS score of 8.7 (High). The vector is network-reachable, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (0.14.3). Upgrading removes the vulnerable code path.

Affected versions

go

  • gogs.io/gogs (< 0.14.3)

Security releases

  • gogs.io/gogs → 0.14.3 (go)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2026-52805 is reachable in your applications. Explore open-source security for your team.

See if CVE-2026-52805 is reachable in your applications. Get a demo

Already deployed Kodem? See CVE-2026-52805 in your environment

Remediation advice

Upgrade gogs.io/gogs to 0.14.3 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-52805

What is CVE-2026-52805?

CVE-2026-52805 is a high-severity security vulnerability in gogs.io/gogs (go), affecting versions < 0.14.3. It is fixed in 0.14.3.

How severe is CVE-2026-52805?

CVE-2026-52805 has a CVSS score of 8.7 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of gogs.io/gogs are affected by CVE-2026-52805?

gogs.io/gogs (go) versions < 0.14.3 is affected.

Is there a fix for CVE-2026-52805?

Yes. CVE-2026-52805 is fixed in 0.14.3. Upgrade to this version or later.

Is CVE-2026-52805 exploitable, and should I be worried?

Whether CVE-2026-52805 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-52805 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-52805?

Upgrade gogs.io/gogs to 0.14.3 or later.

Stop the waste.
Protect your environment with Kodem.