Description
Gitea 1.25.5 caches a branch-specific write-permission result across multiple refs in one pre-receive hook session, allowing a per-branch maintainer-edit grant to be reused for other refs and escalate to full repository write access.
Published: 2026-07-03
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A flaw in Gitea 1.25.5 causes a write‑permission result that is cached per branch to be reused across multiple refs within the same pre‑receive hook session. An attacker who already has maintainer‑edit rights on one branch can thus overwrite refs that belong to other branches, effectively gaining full repository write access. and alter any file in the repository, compromising all data and potentially publishing malicious code. The weakness corresponds to CWE‑863.

Affected Systems

The vulnerability is listed for the Gitea open source Git server, specifically version 1.25.5. No other versions are explicitly stated as affected in the advisory. Version 1.26.3 and newer are referenced as containing a patch that removes the incorrect caching behavior. The product is commonly used in self‑hosted Git hosting environments.

Risk and Exploitability

The CVSS score of 8.8 classifies the issue as high severity, while the EPSS score of < 1% indicates a very low likelihood of attacker to be able to push to a branch for which they have maintainer‑edit rights; from that position, the pre‑receive hook mistakenly propagates the permission to other refs. Once the push succeeds, the attacker can rewrite any reference, including protected branches, leading to destructive impact. Despite the low EPSS, the denial of full‑write control is a severe outcome, warranting immediate attention.

Generated by OpenCVE AI on July 23, 2026 at 16:14 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Gitea to version 1.26.3 or newer, where the permission‑caching logic has been removed.
  • If an upgrade is not immediately feasible, restrict push rights to the vulnerable branch and disable pre‑receive hooks that rely on cached permissions until the patch is applied.
  • Activate auditing or monitoring for attempts to write to protected branches and examine commit histories for unauthorized changes.

Generated by OpenCVE AI on July 23, 2026 at 16:14 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-649p-mmhf-85c7 Gitea: Cached Per-Branch Permission Check in Pre-Receive Hook Allows Full Repository Write
History

Mon, 06 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea Open Source Git Server
Vendors & Products Gitea
Gitea gitea Open Source Git Server

Mon, 06 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 03 Jul 2026 20:45:00 +0000

Type Values Removed Values Added
Description Gitea 1.25.5 caches a branch-specific write-permission result across multiple refs in one pre-receive hook session, allowing a per-branch maintainer-edit grant to be reused for other refs and escalate to full repository write access.
Title Gitea pre-receive hook permission cache allows full repository write access
Weaknesses CWE-863
References

Subscriptions

Gitea Gitea Open Source Git Server
cve-icon MITRE

Status: PUBLISHED

Assigner: Gitea

Published:

Updated: 2026-07-06T15:25:15.796Z

Reserved: 2026-03-03T03:25:59.996Z

Link: CVE-2026-27775

cve-icon Vulnrichment

Updated: 2026-07-06T15:25:05.832Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-23T16:15:03Z

Weaknesses