Description
Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.
Published: 2026-08-26
Score: 9.8 Critical
EPSS: 86.8% High
KEV: Yes
Impact: Remote Code Execution via Diffpatch API
Action: Immediate Patch
AI Analysis

Impact

Gitea versions prior to 1.27.1 contain a CWE‑94 flaw that permits remote code execution through the diffpatch API when a malicious Git hook is installed. The vulnerability can be leveraged by sending specially crafted diffpatch requests that cause the server to execute arbitrary shell commands with the privileges of the Gitea process. It enables full compromise of the host system, leading to data theft, modification, or service disruption.

Affected Systems

All installations of Gitea running a build older than version 1.27.1 are affected. The issue is present in the standard Gitea product distributed by the vendor under the Gitea brand; any instance that exposes the diffpatch API to network clients is at risk.

Risk and Exploitability

The CVSS score of 9.8 classifies this flaw as critical, and Gitea's inclusion in the CISA KEV catalog indicates that it has been actively exploited. The EPSS score of 87% indicates a high likelihood that this vulnerability will be exploited in exposed environments. Based on the description, it is inferred that the attack vector requires network access to the diffpatch API endpoint and the ability to submit a crafted diffpatch request; once this is achieved, the attacker can execute arbitrary shell commands with the privileges of the Gitea process.

Generated by OpenCVE AI on September 1, 2026 at 17:46 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Gitea to version 1.27.1 or later, which contains the fix for the diffpatch API issue
  • If an immediate upgrade is not possible, restrict or disable access to the diffpatch API endpoint, for example by firewall rules or by modifying the Gitea configuration to prevent hook installation via HTTP
  • Deploy a network firewall or VPN to restrict direct external access to the Gitea server, allowing only trusted internal users to use the diffpatch API

Generated by OpenCVE AI on September 1, 2026 at 17:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-rcr6-4jqh-j84m Gitea: Remote Code Execution via diffpatch Git Hook Installation
History

Thu, 27 Aug 2026 15:00:00 +0000

Type Values Removed Values Added
Title Remote Code Execution via Diffpatch API in Gitea

Thu, 27 Aug 2026 12:00:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:gitea:gitea:*:*:*:*:*:-:*:*

Wed, 26 Aug 2026 23:15:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:*

Wed, 26 Aug 2026 22:30:00 +0000

Type Values Removed Values Added
Title Remote Code Execution via Diffpatch API in Gitea

Wed, 26 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea

Wed, 26 Aug 2026 21:30:00 +0000

Type Values Removed Values Added
References
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'active', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 26 Aug 2026 20:15:00 +0000

Type Values Removed Values Added
Description Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.
Weaknesses CWE-94
References
Metrics cvssV3_1

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

kev

{'dateAdded': '2026-08-25T00:00:00+00:00', 'dueDate': '2026-08-28T00:00:00+00:00'}


cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-09-08T18:03:21.873Z

Reserved: 2026-07-08T09:19:08.764Z

Link: CVE-2026-60004

cve-icon Vulnrichment

Updated: 2026-08-26T20:22:53.760Z

cve-icon NVD

Status : Analyzed

Published: 2026-08-26T20:17:56.010

Modified: 2026-08-27T11:41:19.230

Link: CVE-2026-60004

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-01T18:00:18Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')