Skip to main content

Gitea EUVDEUVD-2026-58148

| CVE-2026-57894 HIGH
Server-Side Request Forgery (SSRF) (CWE-918)
2026-07-21 https://github.com/go-gitea/gitea GHSA-82f7-87hm-852x
8.5
CVSS 3.1 · Vendor: https://github.com/go-gitea/gitea
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain or self-register low-priv Gitea account
  2. Delivery
    Host public redirector to internal Git URL
  3. Exploit
    Submit redirector URL to /repo/migrate
  4. Execution
    Git follows redirect past allow-list to internal target
  5. Persist
    Internal repository cloned into attacker repo
  6. Impact
    Mine history for CI/CD and cloud secrets

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires an authenticated low-privileged Gitea account (CVSS PR:L), which may be trivially obtained where self-registration is enabled without mandatory confirmation, and requires repository migrations to be enabled (default in code and app.example.ini). The attacker must control a public HTTP(S) endpoint that passes the allow/block validation and returns a first-hop redirect (e.g. HTTP 302) to an internal Git HTTP(S) target, and the Gitea server must have network reachability to that internal target that the attacker lacks directly. Persistent (repeat) exfiltration additionally requires pull mirrors to be enabled so scheduled git fetch --tags keeps following the redirect. Limiting factors that reduce real-world risk: exploitation is NOT unauthenticated; it fails if migrations or self-registration are disabled, if egress from Gitea to internal ranges is blocked, or if internal Git endpoints require authentication. The report explicitly excludes arbitrary file:// import (git refuses 'Protocol "file" disabled (in redirect)'), direct Gitea RCE, and default Actions-runner execution.

Impact

The supplied CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N, base 8.5 High) is internally consistent with the description: network-reachable, low complexity, requires only a low-privileged account, no user interaction, and a scope change as the Gitea server pivots to internal Git services it is trusted to reach. Confidentiality impact is High (full internal repository and history exfiltration) with only Low integrity (attacker can import content into their own repo) and no availability impact. No EPSS score and no KEV status were provided, so probabilistic and active-exploitation signals are absent - this should be treated as a credible, patch-worthy High rather than a confirmed in-the-wild threat. Real-world priority is driven less by raw CVSS than by environmental factors the report is explicit about: exploitability depends on migrations being enabled (default), the attacker holding or self-registering an account, and the Gitea server having network reachability to sensitive internal Git endpoints. Where those internal repos hold CI/CD secrets, cloud keys, or kubeconfigs, the practical impact escalates toward Critical via post-exploitation credential theft, even though direct RCE is explicitly not confirmed.

Exploit ScenarioDerived

A low-privileged (or self-registered) user hosts a public URL such as https://attacker.example/public.git that answers the initial Git discovery request with a 302 redirect to an internal target like http://internal-git.company.local/team/private.git, then submits the public URL to Gitea's migration flow. Gitea validates only attacker.example, passes the allow/block check, and invokes git clone --mirror, which follows the redirect and imports the internal repository into the attacker's Gitea repo where they mine history for secrets. A vendor-authored local PoC (not public) confirmed the redirect is followed to 127.0.0.1 and the clone completes; with AV:N/AC:L the network path is straightforward, limited only by needing an account and server-to-internal reachability.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 21, 2026

Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authenticated user bypass the migration URL allow/block list by supplying a permitted public Git URL that HTTP-redirects the server's git subprocess to an otherwise-blocked internal endpoint. Because Gitea validates only the originally submitted URL while git runs with its default http.followRedirects=initial, the redirected internal Git repository is cloned into an attacker-controlled repository, and pull mirrors keep re-fetching it on schedule. No public exploit identified at time of analysis; a vendor-authored local proof-of-concept confirmed the redirect is followed to 127.0.0.1, and EPSS/KEV data were not supplied.

RemediationAI

Vendor-released patch: 1.27.0 - upgrade Gitea to 1.27.0 or later, per advisory GHSA-82f7-87hm-852x (https://github.com/go-gitea/gitea/security/advisories/GHSA-82f7-87hm-852x) and release https://github.com/go-gitea/gitea/releases/tag/v1.27.0; the fix disables Git HTTP redirects for migration clone and mirror fetch. If you cannot upgrade immediately, the report's validated compensating control is to run git with http.followRedirects=false for clone and fetch, which was locally confirmed to block the redirect (git returns an HTTP 302 error) at the cost of breaking legitimately-redirecting remotes. Additionally, enforce egress filtering on the Gitea process/container to deny outbound access to loopback, RFC1918, link-local, multicast, and cloud metadata ranges and to internal Git services (trade-off: may block legitimate internal-to-internal migrations); disable repository migrations and new pull mirrors where not needed; restrict migration to trusted users by disabling public self-registration or requiring manual approval; and require authentication on internal Git HTTP(S) endpoints even when network-internal so a blind SSRF cannot fetch objects anonymously.

Affected VersionsENISA

Gitea Open Source Git Server 0 ≤1.26.4

Affected Packages

go code.gitea.io/gitea fix: 1.27.0
go gitea.dev fix: 1.27.0
euvd gitea_open_source_git_server no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is a CWE-918 server-side request forgery arising from a validation/enforcement mismatch across a trust boundary. Gitea's migration handlers (routers/web/repo/migrate.go and routers/api/v1/repo/migrate.go) pass the user-supplied clone address to migrations.IsMigrateURLAllowed, which resolves and checks only the initially submitted host against the allow/block list. The actual data transfer is then delegated to the Git command-line client via gitrepo.CloneExternalRepo and modules/git/repo.go, which builds a git clone --mirror command and sets at most http.sslVerify=false - it never disables redirects. Git's documented default http.followRedirects=initial follows the first-hop redirect and adopts the redirected URL as the base for all subsequent info/refs, HEAD, and object requests, so the effective network sink diverges from the validated policy point. The same weakness applies to scheduled pull-mirror synchronization (services/mirror/mirror_pull.go), which runs git fetch --tags against the stored remote and re-follows the redirect. Gitea does have a protected NewMigrationHTTPClient with a host-matching dialer, but it wraps only service-specific migration API calls, not the raw git clone/fetch. Affected package is pkg:go/code.gitea.io/gitea.

Know when Gitea gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/go-gitea/gitea) PRIMARY 8.5 HIGH
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N
vuln.today AI 8.5 HIGH

Network-reachable migration needs only a low-privileged account (PR:L) and no interaction; the server pivots to internal Git services it is trusted to reach (S:C) exfiltrating full repos (C:H), with only limited integrity and no availability impact.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:H/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (https://github.com/go-gitea/gitea).

CVSS VectorVendor: https://github.com/go-gitea/gitea

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

DescriptionCVE.org

Repository Migration Follows Git HTTP Redirects After URL Allow/Block Validation, Enabling Internal Git Repository Exfiltration

Summary

Gitea validates the user-supplied repository migration URL, but the actual clone and later mirror fetch operations are performed by the Git command-line client without disabling HTTP redirects. Git's default http.followRedirects=initial follows the first redirect and then uses the redirected URL as the base for later repository object requests.

This creates a URL-policy bypass, SSRF, and repository exfiltration primitive. A low-privileged authenticated user can submit an allowed public Git URL that redirects the Gitea server to an otherwise blocked or internal Git HTTP(S) endpoint. Local validation confirmed that Git followed a first-hop redirect to 127.0.0.1, fetched Git objects, and completed the clone; git -c http.followRedirects=false clone blocked the same path.

The main impact is internal Git repository exfiltration into an attacker-controlled Gitea repository. Pull mirrors increase risk because scheduled git fetch --tags operations can keep following the redirect and collect future internal commits.

This is High severity by default for internet-accessible instances with migrations enabled, and can become Critical where internal repositories contain deploy keys, CI/CD secrets, cloud credentials, Terraform state, kubeconfigs, signing material, or production configuration. Direct unauthenticated exploitation, direct Gitea server RCE, arbitrary file:// import, and default Actions runner execution are not confirmed.

Technical Root Cause Analysis

The root cause is a validation/enforcement mismatch across a trust boundary. This should be treated as a product security issue rather than a pure deployment misconfiguration: deployment choices influence reachability and impact, but Gitea applies policy to the originally submitted URL while the Git subprocess is allowed to reach a different effective URL after redirection.

Gitea validates the original migration URL:

  • C:\Users\One\Desktop\gitea_new\gitea\routers\web\repo\migrate.go:180 parses the submitted web migration clone address.
  • C:\Users\One\Desktop\gitea_new\gitea\routers\web\repo\migrate.go:182 calls migrations.IsMigrateURLAllowed.
  • C:\Users\One\Desktop\gitea_new\gitea\routers\api\v1\repo\migrate.go:101 parses the submitted API migration clone address.
  • C:\Users\One\Desktop\gitea_new\gitea\routers\api\v1\repo\migrate.go:103 calls migrations.IsMigrateURLAllowed.

The URL validator resolves and checks the initially supplied host:

  • C:\Users\One\Desktop\gitea_new\gitea\services\migrations\migrate.go:44 defines IsMigrateURLAllowed.
  • C:\Users\One\Desktop\gitea_new\gitea\services\migrations\migrate.go:75 rejects unsupported schemes.
  • C:\Users\One\Desktop\gitea_new\gitea\services\migrations\migrate.go:79 extracts the host.
  • C:\Users\One\Desktop\gitea_new\gitea\services\migrations\migrate.go:85 performs DNS resolution.
  • C:\Users\One\Desktop\gitea_new\gitea\services\migrations\migrate.go:86 enforces the allow/block list on the originally resolved host.

After this validation, the actual repository data transfer is delegated to Git:

  • C:\Users\One\Desktop\gitea_new\gitea\services\repository\migrate.go:93 calls gitrepo.CloneExternalRepo with opts.CloneAddr.
  • C:\Users\One\Desktop\gitea_new\gitea\modules\gitrepo\clone.go:13 delegates to git.Clone.
  • C:\Users\One\Desktop\gitea_new\gitea\modules\git\repo.go:123 constructs a git clone command.
  • C:\Users\One\Desktop\gitea_new\gitea\modules\git\repo.go:125 conditionally sets only http.sslVerify=false.
  • C:\Users\One\Desktop\gitea_new\gitea\modules\git\repo.go:154 appends the source and destination arguments.

No equivalent network policy is applied to the final URL reached by Git after HTTP redirection. The protected migration HTTP client exists for service-specific migration API calls, but it is not used for the raw Git clone/fetch operation:

  • C:\Users\One\Desktop\gitea_new\gitea\services\migrations\http_client.go:16 defines NewMigrationHTTPClient.
  • C:\Users\One\Desktop\gitea_new\gitea\services\migrations\http_client.go:27 applies a host-matching dialer.

That protection does not wrap git clone or git fetch.

The behavior depends on Git's documented redirect handling. The current Git documentation states that http.followRedirects=initial follows the initial request redirect and uses the redirected URL as the base for follow-up requests. The default value is initial: https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpfollowRedirects

This means the effective enforcement point is not the same as the actual network sink. Gitea checks https://attacker.example/repo.git; Git later retrieves http://127.0.0.1:PORT/internal.git/... or another internal target selected by the redirector.

For mirrors, the issue extends beyond initial migration:

  • C:\Users\One\Desktop\gitea_new\gitea\services\repository\migrate.go:177 creates a mirror record when migration is requested as a mirror.
  • C:\Users\One\Desktop\gitea_new\gitea\services\repository\migrate.go:188 stores the sanitized original remote address.
  • C:\Users\One\Desktop\gitea_new\gitea\services\mirror\mirror_pull.go:120 later performs mirror synchronization with git fetch --tags.
  • C:\Users\One\Desktop\gitea_new\gitea\services\mirror\mirror_pull.go:126 fetches from the configured remote.

Because the mirror sync path also delegates to Git, a redirecting remote can continue to redirect scheduled fetches into an internal target.

Affected Assets & Attack Surface

Affected features are URL-based repository migration, API repository migration, pull mirror creation through migration, and scheduled pull mirror synchronization. The relevant entrypoints are POST /repo/migrate for signed-in web users (C:\Users\One\Desktop\gitea_new\gitea\routers\web\web.go:1062) and POST /api/v1/repos/migrate for API-token users (C:\Users\One\Desktop\gitea_new\gitea\routers\api\v1\api.go:1170).

Important preconditions are:

  • Repository migrations are enabled, which is the default in code and example configuration (C:\Users\One\Desktop\gitea_new\gitea\modules\setting\repository.go:181, C:\Users\One\Desktop\gitea_new\gitea\custom\conf\app.example.ini:1078).
  • The attacker has a low-privileged account or the instance permits self-registration. Default/example service settings do not force registration confirmation by default.
  • For persistent exfiltration, pull mirrors must be enabled (C:\Users\One\Desktop\gitea_new\gitea\modules\setting\mirror.go:20).
  • The Gitea server can reach internal Git HTTP(S) services that the attacker cannot reach directly.

High-value targets include internal Gitea, GitLab, GitHub Enterprise, Bitbucket, cgit, git-http-backend, and static bare Git repositories, especially repositories containing CI/CD definitions, deployment manifests, IaC, credentials, or production configuration.

The key trust boundary is that low-privileged user input influences server-side Git network access. Gitea validates the initially supplied URL, then hands control to a Git subprocess whose redirected destination is not constrained by the same allow/block policy. An attacker can discover exposure by using a controlled redirector, observing outbound Git requests, and testing whether scheduled mirror requests continue to arrive.

Exploitation Walkthrough

Scenario 1: One-time internal repository exfiltration

  1. The attacker obtains a low-privileged Gitea account. On instances with open registration, this may require only creating a user.
  2. The attacker hosts a public HTTP endpoint that appears to be a Git remote, for example https://attacker.example/public.git.
  3. The attacker configures the endpoint to respond to the initial Git discovery request with an HTTP redirect to an internal target, for example http://internal-git.company.local/team/private.git/info/refs?service=git-upload-pack.
  4. The attacker submits the public URL to Gitea's repository migration flow.
  5. Gitea validates only attacker.example, which passes the migration allow/block list.
  6. Gitea invokes git clone --mirror against the public URL.
  7. Git follows the initial redirect and uses the internal Git URL as the base for follow-up object requests.
  8. Gitea imports the internal repository contents into the attacker-controlled repository.
  9. The attacker browses the imported repository, downloads an archive, clones it, and searches working tree and history for secrets.

Scenario 2: Persistent exfiltration through pull mirror

  1. The attacker performs the same setup but enables mirror migration.
  2. Gitea creates a mirror record using the attacker-supplied public URL.
  3. On each scheduled mirror synchronization, Gitea runs git fetch --tags against the stored remote.
  4. The attacker's remote again redirects Git to the internal repository.
  5. New internal commits become available in the attacker's Gitea repository after mirror sync.

This materially increases impact because the exposure is not limited to one migration event. The attacker can continue collecting internal commits for as long as the mirror remains enabled and the redirect target remains reachable.

Scenario 3: Credential-to-RCE chain

This chain is conditional but realistic in DevOps environments.

  1. The attacker imports or mirrors an internal repository.
  2. The attacker searches the repository and full Git history for secrets:
  • CI variables committed into workflow files.
  • Cloud access keys.
  • Kubernetes kubeconfigs.
  • Terraform state files or backend credentials.
  • Deployment SSH keys.
  • Package registry tokens.
  • Gitea/GitLab/GitHub PATs.
  1. The attacker uses the recovered credential to access CI/CD, cloud, container registry, deployment hosts, or orchestration infrastructure.
  2. The attacker obtains code execution in a runner, deployment job, Kubernetes workload, cloud function, VM, or production environment.

This is not direct RCE in Gitea from the currently validated evidence. It is a credible post-exploitation chain from server-side internal repository exfiltration to infrastructure compromise.

Scenario 4: Conditional Gitea Actions runner exposure

Actions-related escalation is configuration-dependent.

Relevant code behavior:

  • Actions are detected only when the Actions unit is enabled:
  • C:\Users\One\Desktop\gitea_new\gitea\services\actions\notifier_helper.go:138
  • C:\Users\One\Desktop\gitea_new\gitea\services\actions\notifier_helper.go:146
  • Workflows are detected from commits:
  • C:\Users\One\Desktop\gitea_new\gitea\services\actions\notifier_helper.go:184
  • C:\Users\One\Desktop\gitea_new\gitea\services\actions\notifier_helper.go:186
  • Action runs are created from detected workflows:
  • C:\Users\One\Desktop\gitea_new\gitea\services\actions\notifier_helper.go:321
  • C:\Users\One\Desktop\gitea_new\gitea\services\actions\notifier_helper.go:347
  • Non-fork events do not require approval:
  • C:\Users\One\Desktop\gitea_new\gitea\services\actions\notifier_helper.go:401
  • C:\Users\One\Desktop\gitea_new\gitea\services\actions\notifier_helper.go:405

Default mirror repository units do not include Actions:

  • C:\Users\One\Desktop\gitea_new\gitea\models\unit\unit.go:88
  • C:\Users\One\Desktop\gitea_new\gitea\models\unit\unit.go:96

Therefore, the Actions chain should not be presented as default direct impact. It is a critical conditional chain if an operator enables Actions on migrated/mirrored repositories, customizes default mirror units to include Actions, or manually enables Actions on a mirror. In such cases, redirected repository content containing workflow files may enqueue jobs in a context that is not treated as an untrusted fork pull request.

Proof-of-Concept & Evidence

Code evidence

The vulnerable flow is:

  1. User-controlled clone URL is accepted by the web or API migration handler.
  2. The original URL is validated by IsMigrateURLAllowed.
  3. The same original URL is passed to git clone --mirror.
  4. Git follows the initial HTTP redirect by default.
  5. Gitea does not revalidate the redirected target.

Key code locations:

  • Web migration validation:
  • C:\Users\One\Desktop\gitea_new\gitea\routers\web\repo\migrate.go:180
  • C:\Users\One\Desktop\gitea_new\gitea\routers\web\repo\migrate.go:182
  • API migration validation:
  • C:\Users\One\Desktop\gitea_new\gitea\routers\api\v1\repo\migrate.go:101
  • C:\Users\One\Desktop\gitea_new\gitea\routers\api\v1\repo\migrate.go:103
  • URL policy enforcement:
  • C:\Users\One\Desktop\gitea_new\gitea\services\migrations\migrate.go:44
  • C:\Users\One\Desktop\gitea_new\gitea\services\migrations\migrate.go:85
  • C:\Users\One\Desktop\gitea_new\gitea\services\migrations\migrate.go:86
  • Git clone execution:
  • C:\Users\One\Desktop\gitea_new\gitea\services\repository\migrate.go:93
  • C:\Users\One\Desktop\gitea_new\gitea\modules\gitrepo\clone.go:13
  • C:\Users\One\Desktop\gitea_new\gitea\modules\git\repo.go:123
  • C:\Users\One\Desktop\gitea_new\gitea\modules\git\repo.go:125
  • C:\Users\One\Desktop\gitea_new\gitea\modules\git\repo.go:154
  • Mirror persistence and repeated fetch:
  • C:\Users\One\Desktop\gitea_new\gitea\services\repository\migrate.go:177
  • C:\Users\One\Desktop\gitea_new\gitea\services\repository\migrate.go:188
  • C:\Users\One\Desktop\gitea_new\gitea\services\mirror\mirror_pull.go:120
  • C:\Users\One\Desktop\gitea_new\gitea\services\mirror\mirror_pull.go:126

Local validation summary

A local safe PoC was run with two HTTP services:

  • Redirector service: represents the attacker-controlled public URL.
  • Target service: represents an internal Git HTTP repository on loopback.

Observed behavior:

  • git clone was invoked against the redirector URL.
  • The redirector returned a first-hop HTTP redirect to the internal target URL.
  • Git followed the redirect.
  • The internal target received Git requests for:
  • /info/refs
  • /HEAD
  • object paths required for clone completion
  • The clone completed successfully.
  • The cloned repository contained the expected file content from the internal target repository.

The local PoC result showed:

text
code: 0
redirector hit count: 1
target hit count: 5
cloned content: "internal repo data via redirected git clone"

Mirror fetch behavior was also validated locally:

  • A bare mirror remote was configured to point at the redirector URL.
  • git fetch --tags origin followed the redirect into the internal target.
  • The target received object requests.
  • The mirror fetched the expected branch reference successfully.

The mirror PoC result showed:

text
code: 0
target object requests observed: 5
hasFetchedBranchRef: true

Mitigation behavior was validated locally:

  • The same clone was run with git -c http.followRedirects=false clone.
  • Git failed on the redirect with an HTTP 302 error.
  • This confirms that disabling Git HTTP redirects blocks the validated redirect SSRF path.

The failed mitigation test behavior was:

text
fatal: unable to access '<redirector-url>': The requested URL returned error: 302

Negative validation:

  • An HTTP redirect to file:// was attempted.
  • Git refused the redirected local-file protocol with Protocol "file" disabled (in redirect).
  • Based on this validation, this report does not claim arbitrary local filesystem read or local repository import through file:// redirection.

Validation scope:

  • The local PoC validates the security-critical network sink used by the Gitea migration path: Git clone/fetch follows the redirect and retrieves repository objects from the redirected internal target.
  • The source review validates that Gitea's migration handlers pass the validated clone URL into that Git clone/fetch path without disabling HTTP redirects.
  • A full disposable Gitea UI/API end-to-end import proof was not executed as part of this report. If additional assurance is required before external submission, the highest-value next validation step is to run a temporary Gitea instance, create a low-privileged user, submit the redirector URL through POST /repo/migrate or POST /api/v1/repos/migrate, and confirm that the resulting attacker-owned Gitea repository contains the internal repository content. For mirror mode, add a new commit to the internal target and confirm a later mirror sync imports it.

Impact Assessment

Confirmed impact is server-side Git network access to a redirected destination, resulting in internal Git repository import when the redirected target is reachable from the Gitea server. This can expose private source code, full Git history, deleted secrets, internal architecture, deployment pipelines, service names, and future commits if pull mirrors continue syncing.

The highest-risk secondary impact is secret extraction. Internal repositories often contain CI/CD definitions, deployment scripts, kubeconfigs, Terraform state, cloud keys, registry tokens, package publishing tokens, PATs, SSH deploy keys, webhook secrets, and historical credentials. Exposure of these materials can escalate to CI/CD compromise, cloud compromise, production access, or supply-chain compromise.

Direct Gitea server RCE is not confirmed. The clone path uses git clone --mirror, remote Git hooks are not executed by a normal clone, local validation showed Git rejects file:// redirects, and the reviewed command construction does not show obvious shell injection. Indirect RCE remains plausible through stolen CI/CD, cloud, deployment, package, or Actions runner credentials.

Incident responders should treat exploitation as potential source-code and secret disclosure, not just SSRF probing. Recommended triage is to review recently migrated repositories and mirrors, identify unusual migration sources or redirector domains, inspect Gitea and egress logs around migration/mirror sync times, secret-scan affected full histories, rotate exposed credentials, and remove malicious mirror configurations.

Remediation Guidance

Disable Git HTTP redirects for migration clone and mirror fetch operations unless every redirect hop is explicitly revalidated under the same migration allow/block policy.

Recommended immediate code changes:

  • Invoke migration clone as git -c http.followRedirects=false clone ... (C:\Users\One\Desktop\gitea_new\gitea\modules\git\repo.go:123).
  • Invoke pull mirror fetch as git -c http.followRedirects=false fetch ... (C:\Users\One\Desktop\gitea_new\gitea\services\mirror\mirror_pull.go:122).

Local mitigation testing confirmed that http.followRedirects=false prevents the redirect-based clone from succeeding. If redirect support is required for compatibility, Gitea should follow redirects in controlled code, validate each hop against the migration network policy, and then invoke Git with redirects disabled.

Defense in depth:

  • Enforce egress restrictions for the Gitea process/container.
  • Block outbound access to loopback, RFC1918, link-local, multicast, metadata-service ranges, and internal Git services unless explicitly required.
  • Disable repository migrations and new pull mirrors where not operationally required.
  • Restrict migration access to trusted users; disable public self-registration or require manual approval.
  • Require authentication on internal Git HTTP endpoints even when they are network-internal.

Risk Classification

Severity: High by default for internet-accessible instances with repository migrations enabled; Critical in environments where Gitea can reach sensitive internal Git services containing secrets, deploy keys, CI/CD credentials, cloud credentials, or production configuration.

Critical escalation conditions:

Critical escalation conditions include sensitive internal Git reachability, weak egress controls, repositories containing production or CI/CD secrets, enabled pull mirrors that continue syncing future commits, or configurations where imported workflow content can reach shared/self-hosted Actions runners.

Not confirmed:

Direct unauthenticated exploitation, direct Gitea server RCE from the migration clone path, arbitrary local filesystem read via file:// redirect, and default Actions runner execution from mirror sync without configuration changes.

Executive ViewAI

Why It Matters

Gitea instances before version 1.27.0 expose internal code repositories to unauthorized theft by any authenticated user. The vulnerability allows attackers to create self-renewing mirrors that persistently pull internal Git repositories, converting a single account compromise into ongoing unauthorized access to proprietary source code and sensitive technical assets.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: disable pull mirrors and repository import features; restrict Gitea's outbound network access to external-only destinations; require manual approval for all migration source URLs; immediately audit and delete any mirrors created in the past 30 days; monitor application logs for HTTP 3xx status codes and redirect patterns that indicate exploitation attempts.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Medium
popular self-hosted Git service, common in DevOps but not enterprise-ubiquitous
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

62
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Gitea

View all
CVE-2026-60004 CRITICAL POC
9.8

Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi

CVE-2026-27771 HIGH POC
8.2 Jul 03

Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r

CVE-2022-30781 HIGH POC
7.5 May 16

Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp

CVE-2020-14144 HIGH POC
7.2 Oct 16

The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir

CVE-2024-6886 CRITICAL POC
10.0 Aug 06

Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea

CVE-2026-72867 CRITICAL POC
9.9 Aug 10

Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us

CVE-2026-20896 CRITICAL POC
9.8 Jul 03

Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any

CVE-2026-59774 CRITICAL POC
9.8

Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by

CVE-2026-58053 CRITICAL POC
9.4 Jun 28

Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec

CVE-2019-11229 HIGH POC
8.8 Apr 15

models/repo_mirror.go in Gitea before 1.7.6 and 1.8.x before 1.8-RC3 mishandles mirror repo URL settings, leading to rem

CVE-2026-24791 HIGH POC
8.1 Jun 17

Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran

CVE-2020-13246 HIGH POC
7.5 May 20

An issue was discovered in Gitea through 1.11.5. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy