Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
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.
Primary rating from Vendor (Gitea).
CVSS VectorVendor: Gitea
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Lifecycle Timeline
4DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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).
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).
Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r
Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp
The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea
Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any
Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec
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
Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica
An issue was discovered in Gitea through 1.11.5. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita
Missing Authorization in GitHub repository go-gitea/gitea prior to 1.16.4. Rated high severity (CVSS 7.1), this vulnerab
Open Redirect on login in GitHub repository go-gitea/gitea prior to 1.16.5. Rated medium severity (CVSS 6.1), this vulne
Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us
Same weakness CWE-59 – Improper Link Resolution Before File Access
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-41624
GHSA-h697-89cp-24q8