CVE-2026-25718: Gitea improper link resolution in template repository generation

CVE-2026-25718 · Severity: critical · CVSS 9.1 · Published 2026-07-03

Gitea, a self-hosted Git service, contains a path traversal vulnerability in its template repository generation feature that allows an attacker to read or write files outside the intended directory through symlinks or crafted paths. An attacker without authentication can exploit this to access sensitive repository data or modify files on the server hosting Gitea.

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

Quick answers

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

Technical details

The vulnerability is a CWE-59 (Improper Link Resolution Before File Access / Link Following) flaw in Gitea's template repository generation logic. During path resolution, the code fails to properly validate or normalize paths, permitting symlinks and other non-regular filesystem paths to be traversed. An attacker can supply a crafted repository name or template path that resolves through symlinks to read arbitrary files or write to unintended locations on the server. The attack requires network access to Gitea's web interface and no authentication or user interaction; the vulnerability is triggered when creating or processing template repositories. The fix, included in Gitea 1.25.5, properly resolves and validates filesystem paths before access. References: GitHub PR #36734, #36746.

Affected products

  • Gitea Gitea < 1.25.5

Identifiers

  • CVE-2026-25718
  • GHSA-h697-89cp-24q8
  • GO-2026-6340

Timeline

  • 2026-07-03: disclosed: Vulnerability published to GitHub Advisory Database
  • 2026-03-16: patched: Fix released in Gitea 1.25.5

References

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