Vulnerability record · CVE-2026-60004 · published 26 August 2026
CVE-2026-60004: Gitea diffpatch API code injection enables remote code execution
Gitea · Gitea
Gitea before 1.27.1 allows remote code execution through the diffpatch API by way of Git hook installation. The flaw is a code injection issue (CWE-94) that lets an unauthenticated network attacker run code on the server, which matters because Gitea instances are often internet-facing and hold source code and CI credentials.
Description
Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Automated analysis
critical priorityUnauthenticated network-reachable remote code execution with a CVSS score of 9.8, KEV listing and very high EPSS probability.
What it is
Gitea before 1.27.1 allows remote code execution through the diffpatch API by way of Git hook installation. The flaw is a code injection issue (CWE-94) that lets an unauthenticated network attacker run code on the server, which matters because Gitea instances are often internet-facing and hold source code and CI credentials.
Impact
An attacker gains arbitrary code execution on the Gitea host, with high impact to confidentiality, integrity and availability. That can lead to theft of repositories, tokens and secrets, or full compromise of the server.
Attack surface
Reached over the network through the diffpatch API; the CVSS vector indicates no authentication (PR:N) and no user interaction (UI:N) are required. Any Gitea instance exposing the API is potentially reachable.
Exploitation
CVE-2026-60004 is listed in CISA KEV with a due date of 2026-08-28, and EPSS gives a 30-day probability of 0.86777 (99.7th percentile). Public exploit and mitigation references exist, and KEV does not record ransomware campaign use.
What to do
- Upgrade Gitea to 1.27.1 or later, following the vendor release notes and security advisory.
- If patching cannot be done immediately, restrict or disable access to the diffpatch API and limit Git hook installation paths per vendor guidance.
- Remove internet exposure of the Gitea web/API interface where feasible, placing it behind authentication and network controls.
- Apply CISA BOD 26-04 required actions, including the stated forensics triage requirements, and discontinue use of the product if mitigations are unavailable.
- Audit repository and server-side Git hooks for unauthorized additions or modifications.
Detection
- Review Gitea and reverse-proxy logs for anomalous requests to the diffpatch API endpoint, especially from unexpected source addresses.
- Monitor filesystem changes to Git hook directories and Gitea configuration for newly created or altered hook scripts.
- Alert on unexpected child processes spawned by the Gitea service account, such as shells or interpreters.
- Check for outbound connections or credential access from the Gitea host that do not match normal operation.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Exploitation in the wild
CISA added CVE-2026-60004 to the Known Exploited Vulnerabilities catalog on 25 August 2026 as "Gitea Code Injection Vulnerability". Required action: Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines. Federal deadline 28 August 2026.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://blog.gitea.com/release-of-1.27.1/ | Release Notes |
| https://github.com/0xBlackash/CVE-2026-60004 | ExploitMitigationThird Party Advisory |
| https://github.com/go-gitea/gitea/security/advisories/GHSA-rcr6-4jqh-j84m | ExploitVendor Advisory |
| https://www.runzero.com/blog/gitea/ | Third Party Advisory |
| https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-60004 | US Government Resource |
Track CVE-2026-60004 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2026-60004), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.