CVE-2026-57894: Gitea SSRF and repository exfiltration via Git HTTP redirects

CVE-2026-57894 · Severity: high · CVSS 8.5 · Published 2026-07-21

A vulnerability in Gitea's repository migration feature allows users to bypass security filters and access internal network resources. By providing a specially crafted URL that redirects to an internal server, an attacker can trick Gitea into stealing private source code or sensitive configuration files from the company's internal network. This could lead to the exposure of trade secrets, login credentials, and other sensitive data stored in private repositories.

Technologies: Gitea, code.gitea.io/gitea (Go), gitea.dev (Go). Vendors: Gitea, Go.

Quick answers

Is CVE-2026-57894 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-57894 being exploited in the wild.
How severe is CVE-2026-57894?
High severity, with a CVSS score of 8.5, published 21 July 2026.
Which products and versions are affected?
Gitea < 1.27.0; code.gitea.io/gitea (Go) < 1.27.0, SEMVER:introduced=0,fixed=1.27.0; gitea.dev (Go) SEMVER:introduced=0,fixed=1.27.0.
Is there a fix for CVE-2026-57894?
Yes. code.gitea.io/gitea (Go): upgrade to 1.27.0 or later; gitea.dev (Go): upgrade to 1.27.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-57894 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-57894?
Check whether you run Gitea, code.gitea.io/gitea (Go) or gitea.dev (Go) 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

  • code.gitea.io/gitea (Go): upgrade to 1.27.0 or later
    go get code.gitea.io/gitea@v1.27.0
  • gitea.dev (Go): upgrade to 1.27.0 or later
    go get gitea.dev@v1.27.0

Technical details

A Server-Side Request Forgery (SSRF) vulnerability exists in Gitea's repository migration and pull mirror features. While Gitea validates the initial migration URL against an allow/block list, it delegates the actual 'git clone' and 'git fetch' operations to the Git CLI. By default, Git follows HTTP redirects (http.followRedirects=initial), which Gitea does not re-validate. An authenticated attacker can provide a public URL that redirects to an internal Git service (e.g., 127.0.0.1 or internal hostnames). This allows the attacker to import internal repository contents, including history and secrets, into a Gitea repository they control. The issue is fixed in version 1.27.0 by disabling redirect following in Git commands.

Affected products

  • Gitea Gitea < 1.27.0

Identifiers

  • CVE-2026-57894
  • GHSA-82f7-87hm-852x
  • GO-2026-6027

Timeline

  • 2026-07-13: advisory: Initial GitHub Advisory published
  • 2026-07-21: patched: Version 1.27.0 released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.