Skip to main content

Gitea CVE-2026-25718

| EUVDEUVD-2026-41624 CRITICAL
Improper Link Resolution Before File Access (CWE-59)
2026-07-03 Gitea GHSA-h697-89cp-24q8
9.1
CVSS 3.1 · Vendor: Gitea
View

Attack ChainAIDerived

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

  1. Access
    Register/authenticate to Gitea instance
  2. Delivery
    Create template repo with symlinked path
  3. Exploit
    Invoke generate-from-template
  4. Execution
    Path resolution follows symlink
  5. Persist
    Read or write file outside root
  6. Impact
    Disclose secrets or tamper data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
Exploitation Conditions

Exploitation requires the Gitea template repository generation feature to be used: the attacker must be able to supply or control the contents of a template repository (planting a symlinked directory or non-regular file), and then invoke repository generation from that template. This normally requires an authenticated Gitea account with permission to create/own a template repository and to generate a new repository from it; on instances with open registration that barrier is low, whereas instances that disable self-registration or restrict repository creation to trusted users substantially limit exploitation. It affects all versions before 1.25.5 on any platform; note the official vector states PR:N but the feature mechanics realistically imply an authenticated, template-controlling actor, so treat PR:N with caution.

Impact

The signals are mixed and should be read together rather than off the raw 9.1. The CVSS vector (AV:N/AC:L/PR:N/UI:N) claims fully remote, unauthenticated, low-complexity exploitation, and SSVC marks the issue automatable with total technical impact - pointing to a serious flaw. However, EPSS is very low (0.17%, 7th percentile) and SSVC exploitation is 'none', with no KEV listing and no public exploit identified, indicating no observed real-world attacks yet. There is also tension between the PR:N in the official vector and the actual mechanics: template repository generation is a feature invoked by a logged-in user creating a repository from a template, and the attack requires controlling the contents of a template repo, which realistically implies at least an authenticated account and the ability to craft or influence a template - so the effective privilege requirement is likely PR:L rather than PR:N. The tags label this 'Information Disclosure', but the code (WriteRegularPathFile) and CVSS I:H show it is both read AND write, making integrity impact real, not just disclosure. Net assessment: a genuinely high-severity, patch-worthy bug for any multi-user or public-registration Gitea instance, but current exploitation risk is low and likely to be targeted rather than mass-exploited.

Exploit ScenarioDerived

An attacker with an account on a multi-user Gitea instance creates a template repository whose tree contains a symlinked directory or file pointing outside the repository root, then triggers the 'generate repository from template' operation. During generation Gitea follows the symlink and either reads a sensitive server-side file into the new repository (disclosure) or writes attacker-controlled content to an unintended location (integrity). No public exploit code is identified at time of analysis, but the low attack complexity and automatable nature make weaponization plausible.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
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 22, 2026

Arbitrary file read and write in Gitea before 1.25.5 arises when the template repository generation feature resolves paths through symlinks or other non-regular file types instead of restricting itself to regular files within the target root. An attacker who controls a template repository can plant symlinked or special paths so that generation reads sensitive files or writes attacker-controlled data outside the intended boundary, yielding high confidentiality and integrity impact (CVSS 9.1). There is no public exploit identified at time of analysis, the EPSS probability is low (0.17%, 7th percentile), and CISA SSVC records exploitation as 'none', but the flaw is automatable with total technical impact.

RemediationAI

Vendor-released patch: upgrade Gitea to version 1.25.5 or later, which contains the fixes from PRs https://github.com/go-gitea/gitea/pull/36734 and https://github.com/go-gitea/gitea/pull/36746 (see release https://github.com/go-gitea/gitea/releases/tag/v1.25.5 and https://blog.gitea.com/release-of-1.25.5/). Until you can patch, reduce exposure by disabling or restricting the template repository feature and by limiting who can create template repositories and generate repositories from them - restrict repository creation to trusted users and disable open self-registration so untrusted accounts cannot supply malicious templates (trade-off: blocks legitimate self-service onboarding and template-based repo creation). Additionally, ensure the Gitea service account runs with least privilege on the filesystem so that any read/write redirected through a symlink is confined and cannot reach sensitive host files (trade-off: none significant, and it is good hardening regardless).

Affected VersionsENISA

Gitea Open Source Git Server 0 <1.25.5

Affected Packages

go code.gitea.io/gitea fix: 1.25.5
euvd gitea_open_source_git_server fix: 1.25.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 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 vulnerability is a CWE-59 link-following / improper link resolution issue in Gitea's Go codebase, specifically in the path-handling helpers used when Gitea instantiates a new repository from a template repository. The pre-fix logic used os.Lstat only to test whether a final target was a regular file and did not validate that every intermediate path component was a genuine regular directory, so a symlinked directory or symlinked file placed inside the template tree could redirect a read or write to a location the operator did not intend. The upstream fix (PRs 36734 and 36746) replaces the old IsRegularFile check with new ReadRegularPathFile and WriteRegularPathFile helpers that walk each sub-path element, Lstat every component, and reject the operation with ErrNotRegularPathFile if any parent is not a regular directory or the leaf is not a regular file - closing both the symlinked-directory and symlinked-file traversal paths, as the added unit tests (link-dir/real-file, real-dir/link-file, link-dir/link-file) demonstrate. The affected component is the Gitea open-source Git server (CPE cpe:2.3:a:gitea:gitea_open_source_git_server).

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 (Gitea) PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 8.1 HIGH

Remote and low-complexity, but requires an authenticated user who controls a template repository to trigger generation, so PR:L; symlink abuse yields file read and write (C:H/I:H) with no availability impact.

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

Primary rating from Vendor (Gitea).

CVSS VectorVendor: Gitea

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

Lifecycle Timeline

2
CVE Published
Jul 03, 2026 - 20:19 cve.org
CRITICAL 9.1
CVE Published
Jul 03, 2026 - 20:19 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

Gitea versions before 1.25.5 mishandle path resolution during template repository generation, allowing template processing to read or write through symlinked or otherwise non-regular paths.

Executive ViewAI

Why It Matters

Gitea before version 1.25.5 contains a critical vulnerability enabling arbitrary read and write of files on affected systems through the template repository feature, potentially exposing sensitive data and enabling malicious code injection. Organizations relying on Gitea's template capabilities face immediate risks to data confidentiality and system integrity if running unpatched versions.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Medium
popular self-hosted Git server, common in self-hosted/dev environments but not universal
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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-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-57894 HIGH POC
8.5 Jul 21

Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica

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: Critical

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