# CVE-2026-52805: Gogs SSRF in repository migration and mirror sync

Source: https://junglewise.ai/threats/cve-2026-52805-gogs-ssrf-in-repository-migration-and-mirror-sync  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-24. Updated: 2026-06-24  
License: CC BY 4.0 with a link back

CVE-2026-52805 · Severity: high · CVSS 8.7 · Published 2026-06-24

Gogs, a self-hosted Git service, is vulnerable to a security flaw in its repository migration and mirroring features. An authenticated user can trick the system into connecting to internal company servers that should be private. This could allow an attacker to steal sensitive internal data or access private services by importing their contents into a public-facing repository.

Technologies: [gogs.io/gogs (Go)](https://junglewise.ai/threats/technologies/gogs-io-gogs), [Gogs](https://junglewise.ai/threats/technologies/gogs). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Gogs](https://junglewise.ai/threats/vendors/gogs).

## Quick answers

**Is CVE-2026-52805 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-52805 being exploited in the wild.

**How severe is CVE-2026-52805?** High severity, with a CVSS score of 8.7, published 24 June 2026.

**Which products and versions are affected?** gogs.io/gogs (Go) < 0.14.3, SEMVER:introduced=0, SEMVER:introduced=0,fixed=0.14.3; Gogs < 0.14.3.

**Is there a fix for CVE-2026-52805?** Yes. gogs.io/gogs (Go): upgrade to 0.14.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-52805 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-52805?** Check whether you run gogs.io/gogs (Go) or Gogs at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- gogs.io/gogs (Go): upgrade to 0.14.3 or later

  ```sh
  go get gogs.io/gogs@v0.14.3
  ```


## Technical details

A Server-Side Request Forgery (SSRF) vulnerability exists in Gogs' repository migration and mirror synchronization logic. While Gogs validates the initial URL hostname against a blocklist, the underlying 'git clone --mirror' command follows HTTP redirects without re-validating the new destination. Additionally, the recurring mirror sync failed to re-validate hostnames, allowing an attacker to bypass initial checks via DNS rebinding or by changing a benign URL to redirect to an internal endpoint (e.g., 127.0.0.1) after the mirror was established. This allows an authenticated attacker to import contents from internal-only services into an attacker-controlled repository. The fix in version 0.14.3 disables HTTP redirects for git operations and implements mandatory hostname re-validation before every sync.

## Affected products

- Gogs Gogs < 0.14.3

## Identifiers

- CVE-2026-52805
- GHSA-g2f5-gjr4-qjvm
- GO-2026-5387

## Timeline

- 2026-06-05: patched: Fix committed to main branch.
- 2026-06-07: advisory: Release v0.14.3 published.
- 2026-06-24: disclosed: CVE-2026-52805 published.

## References

- [https://github.com/gogs/gogs/commit/b9a0093e9cd1b2b3c7f42f9feca396dc772c4f1b](https://github.com/gogs/gogs/commit/b9a0093e9cd1b2b3c7f42f9feca396dc772c4f1b)
- [https://github.com/gogs/gogs/pull/8324](https://github.com/gogs/gogs/pull/8324)
- [https://github.com/gogs/gogs/releases/tag/v0.14.3](https://github.com/gogs/gogs/releases/tag/v0.14.3)
- [https://github.com/gogs/gogs/security/advisories/GHSA-g2f5-gjr4-qjvm](https://github.com/gogs/gogs/security/advisories/GHSA-g2f5-gjr4-qjvm)

## Related threats

- [Gogs Git Smart HTTP authorization bypass](https://junglewise.ai/threats/cve-2026-123012-in-gogs-0-14-3-the-git-smart-http-authorization-layer-in)
- [Gogs open redirect via backslash normalization mismatch](https://junglewise.ai/threats/cve-2026-82402-gogs-is-an-open-source-self-hosted-git-service-prior-to-0-15-0)
- [GO-2026-5193 - Gogs: XSS in .ipynb files renderer due to outdated notebookjs in gogs.io/gogs](https://junglewise.ai/threats/go-2026-5193-gogs-xss-in-ipynb-files-renderer-due-to-outdated-d1e8727f)
- [Gogs stored XSS in Jupyter Notebook sanitizer endpoint](https://junglewise.ai/threats/cve-2026-52816-gogs-stored-xss-in-jupyter-notebook-sanitizer-endpoint)
- [Gogs unauthenticated information disclosure in organization teams API](https://junglewise.ai/threats/cve-2026-52815-gogs-unauthenticated-information-disclosure-in-organization-teams)
