CVE-2026-60004

Remote Code Execution via Diffpatch API in Gitea

Published Aug 26, 2026 CVSS 3.1 · 9.8 Critical EPSS 24.0% KEV · Listed
Description
Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.

Analysis

AI-generated

Technical 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 24% indicates a moderate 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.

Remediation

No solution or workaround provided in the CVE record.

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 24, 2026 at 23:26 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
Type Values Removed Values Added
Title Remote Code Execution via Diffpatch API in Gitea
Type Values Removed Values Added
Title Remote Code Execution via Diffpatch API in Gitea
Type Values Removed Values Added
CPEs cpe:2.3:a:gitea:gitea:*:*:*:*:*:-:*:*
Type Values Removed Values Added
CPEs cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Title Remote Code Execution via Diffpatch API in Gitea
Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea
Type Values Removed Values Added
References
Metrics ssvc

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

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'}

Weaknesses
  • CWE-94

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

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Sep 8, 2026, 6:03 PM
Reserved
Jul 8, 2026, 9:19 AM
Status
Analyzed
Published
Aug 26, 2026, 8:17 PM
Modified
Aug 27, 2026, 11:41 AM