The U.S. Cybersecurity and Infrastructure Security Agency (CISA) has added a critical remote code execution (RCE) vulnerability in Gitea, a popular self-hosted Git service, to its Known Exploited Vulnerabilities (KEV) catalog. The vulnerability, tracked as CVE-2026-60004, has a CVSS score of 9.8 and is confirmed to be actively exploited in the wild. The flaw allows an attacker with repository write permissions to achieve RCE on the Gitea server. Due to the risk, CISA has mandated that all Federal Civilian Executive Branch agencies apply the patch by August 28, 2026. All organizations using affected Gitea versions are strongly advised to upgrade immediately.
The vulnerability exists in how Gitea processes patch files. An attacker with write access to a repository can exploit this flaw by sending a specially crafted patch to the diffpatch API endpoint. This malicious patch can be used to create an executable Git hook within the repository's .git/hooks directory.
Once the malicious hook (e.g., a pre-receive or post-receive hook) is in place, it will be executed by the Gitea server during subsequent Git operations, allowing the attacker to run arbitrary shell commands with the permissions of the Gitea service account.
A critical aggravating factor is that Gitea's default configuration allows for open user registration. This means a remote, unauthenticated attacker can simply create a new account, create a new repository to gain the necessary write permissions, and then execute the exploit. No prior access or credentials are required on these default-configured instances.
The vulnerability was patched in Gitea version 1.27.1, released in late July 2026.
CISA has confirmed that CVE-2026-60004 is being actively exploited in the wild. While CISA did not provide technical details of the ongoing attacks, an independent report from a developer confirmed their Gitea instance was compromised via this vulnerability. The attackers deployed a payload that exhibited behavior consistent with a cryptocurrency miner, identified after a sudden spike in server CPU usage.
Successful exploitation of this vulnerability leads to remote code execution on the server hosting the Gitea service. The impact is critical:
root or a dedicated service account.The following patterns may help identify vulnerable or compromised systems:
*/api/v1/repos/{owner}/{repo}/patch*.git/hooks/*giteash, bash, or cryptominer binaries.High CPU Usagediffpatch API endpoint, especially from newly registered or untrusted users..git/hooks directory. Alert on any creation of new executable files in this location.[service] DISABLE_REGISTRATION = true) if it is not required for your operations. This mitigates the risk of unauthenticated attackers easily gaining the permissions needed to launch the exploit.The primary and most effective mitigation is to upgrade Gitea to a patched version (1.27.1 or later).
Mapped D3FEND Techniques:
Disable open user registration on the Gitea instance to prevent unauthenticated attackers from creating accounts to exploit the vulnerability.
Run the Gitea service in a container or with a low-privilege user account to limit the impact of a successful RCE.
Mapped D3FEND Techniques:
The definitive countermeasure for CVE-2026-60004 is to immediately upgrade all Gitea instances to version 1.27.1 or newer. This action directly remediates the vulnerability in the diffpatch API endpoint. Given that CISA has confirmed active exploitation, this patch should be treated as an emergency. Organizations should use asset management and vulnerability scanning tools to identify all internet-facing and internal Gitea instances and prioritize their patching. After patching, a verification scan should be performed to confirm the upgrade was successful and the vulnerability is no longer exploitable.
As a critical hardening measure, administrators should immediately review and disable the open registration feature in Gitea if it is not essential for their operations. This can be done by setting [service] DISABLE_REGISTRATION = true in the app.ini configuration file. This single change significantly raises the bar for attackers, as it removes the easiest path to gaining the 'repository write access' prerequisite for the exploit. While not a replacement for patching, it is a powerful compensating control that neutralizes the threat from unauthenticated remote attackers and limits potential exploitation to existing, authenticated users.
To hunt for existing compromise, security teams should implement file integrity monitoring (FIM) or run periodic scans on their Gitea servers. The focus should be on the .git/hooks directory within every repository hosted on the instance. The creation of any new executable files (e.g., pre-receive, post-receive) in these directories is highly suspicious and a direct indicator of an attempted or successful exploit of CVE-2026-60004. An automated script can be used to recursively scan all repository storage paths for such files. Any findings should be immediately investigated as a potential breach.
Gitea developers release version 1.27.1, patching CVE-2026-60004.
CISA adds CVE-2026-60004 to its Known Exploited Vulnerabilities (KEV) catalog.
CISA's deadline for U.S. federal agencies to remediate the vulnerability.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
CyberNetSec.io uses automation to assist source monitoring, deduplication, observable extraction, and structured intelligence generation. Published analysis follows human-defined editorial standards and adds defensive context including MITRE ATT&CK, D3FEND, STIX, and Sigma where applicable. Read our editorial policy.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.