Gitea contains a code injection vulnerability that allows an attacker with repository write access to send a malicious patch to the diffpatch API endpoint to plant an executable Git hook and run shell commands as the Gitea service account.
In short
CVE-2026-60004 (Gitea Code Injection) has a CVSS 3.1 base score of 9.8, rated critical. CISA added it to the Known Exploited Vulnerabilities catalog on 25 Aug 2026. Fixed in Gitea 1.27.1 or later.
Description
Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.
CVSS 3.1 breakdown
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HAffected products
- Gitea≥ 1.17.0 < 1.27.1
Remediation
Fixed in- Gitea≥ 1.27.1
References
Data from the NVD, CISA KEV catalog and FIRST EPSS. The CVSS 4.0 base score is shown where the NVD has one, otherwise CVSS 3.1.
