CVE-2026-27775

Gitea pre-receive hook permission cache allows full repository write access

Published Jul 3, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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. 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 an attacker being able to push to a branch for which they have maintainer‑edit rights; from that position, the exploit would allow the attacker to 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.

Remediation

No solution or workaround provided in the CVE record.

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 31, 2026 at 14:45 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
Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea Open Source Git Server
Vendors & Products Gitea
Gitea gitea Open Source Git Server
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'}

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
Weaknesses

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Jul 6, 2026, 3:25 PM
Reserved
Mar 3, 2026, 3:25 AM
Status
Deferred
Published
Jul 3, 2026, 9:16 PM
Modified
Oct 25, 2026, 3:10 PM