Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Gitea: Repository Migration Follows Git HTTP Redirects After URL Allow/Block Validation, Enabling Internal Git Repository Exfiltration (CVE-2026-57894)

0
High
Published: 07/21/2026 (07/21/2026, 19:17:21 UTC)
Source: GCVE Database
Product: code.gitea.io/gitea

Description

Gitea versions prior to 1.27.0 contain a vulnerability where repository migration URLs are validated before cloning, but the Git client follows HTTP redirects without restriction. This allows a low-privileged authenticated user to bypass URL allow/block policies by submitting a public Git URL that redirects to an internal or otherwise blocked Git repository. The Git client then fetches repository data from the redirected internal endpoint, enabling exfiltration of internal Git repositories. The issue affects migration and mirror fetch operations, potentially exposing sensitive internal repositories and secrets. The vulnerability is high severity for internet-facing instances with migrations enabled and can escalate to critical if sensitive internal data is exposed. No direct unauthenticated exploitation or remote code execution is confirmed.

CVSS v3.1

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N

Affected software

Goghsa
code.gitea.io/gitea
Affected versions
<1.27.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/22/2026, 00:56:46 UTC

Technical Analysis

Gitea performs URL validation on user-supplied repository migration URLs to enforce allow/block policies. However, the actual cloning and mirror fetch operations are executed by the Git command-line client, which by default follows HTTP redirects (http.followRedirects=initial). This behavior allows an attacker to submit a permitted public Git URL that redirects to an internal or blocked Git HTTP(S) endpoint, bypassing Gitea's URL validation. The Git client follows the redirect and fetches repository objects from the internal endpoint, enabling repository exfiltration. This mismatch between Gitea's validation of the original URL and Git's redirect-following behavior creates a server-side request forgery (SSRF) and data exfiltration vector. The vulnerability affects migration and mirror fetch operations, with mirrors increasing risk due to scheduled fetches that continue following redirects. The root cause is a trust boundary enforcement mismatch where Gitea does not apply network policy to the final URL after redirection. No patch or official fix is indicated in the provided data.

Potential Impact

An authenticated low-privileged user can exfiltrate internal Git repositories by exploiting HTTP redirects during repository migration or mirror fetch operations. This can lead to unauthorized disclosure of sensitive internal repositories, including those containing deploy keys, CI/CD secrets, cloud credentials, Terraform state, kubeconfigs, signing material, or production configuration. The vulnerability does not confirm direct unauthenticated exploitation, remote code execution, or arbitrary file import. The risk is highest for internet-accessible Gitea instances with migration enabled and internal repositories containing sensitive data.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, administrators should consider disabling repository migration and mirror fetch features for untrusted users or restrict migration URLs to trusted hosts without redirects. Monitoring and restricting Git client behavior regarding HTTP redirects may also help mitigate risk. Review deployment configurations to limit internal network exposure from Gitea servers.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-82f7-87hm-852x
Osv Schema Version
1.4.0
Aliases
["CVE-2026-57894"]
Ecosystems
["Go"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a600ac79c2644c7f8fe3a9d

Added to database: 07/22/2026, 00:11:51 UTC

Last enriched: 07/22/2026, 00:56:46 UTC

Last updated: 07/22/2026, 01:35:57 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses