Gitea unauthenticated RCE exploited in wild (CVE-2026-60004) [PoC]
CVE-2026-60004
CVE-2026-60004: Gitea before 1.27.1 unauthenticated RCE via diffpatch API, CVSS 9.8, confirmed exploited. Update to 1.27.1 immediately or disable the API.
Actively exploited in the wild - CVE-2026-60004 is a critical remote code execution vulnerability in Gitea before 1.27.1 that lets unauthenticated attackers execute arbitrary commands on the server through the diffpatch API. Patched in version 1.27.1 - update immediately.
Overview
CVE-2026-60004 is a critical remote code execution (RCE) flaw with a CVSS score of 9.8. The vulnerability exists in the diffpatch API endpoint of Gitea, a popular self-hosted Git service. An attacker can exploit the API to install malicious Git hooks, which execute automatically when repository events occur, giving them full control over the affected server.
The attack requires no authentication and no user interaction. An attacker with network access to the Gitea instance can send crafted requests to the diffpatch API, which improperly handles patch data and allows Git hook installation. Once installed, the hooks run with the privileges of the Gitea process, leading to complete server compromise.
Impact
Successful exploitation grants the attacker:
- Full remote code execution on the host system
- Access to all repositories, including private ones
- Credentials and secrets stored in the Gitea configuration
- Potential lateral movement into the broader network
The CISA Known Exploited Vulnerabilities (KEV) catalog confirms active exploitation in the wild, meaning real-world attacks are already occurring. Given the unauthenticated nature and low attack complexity, any internet-exposed Gitea instance is at immediate risk.
Remediation
Upgrade Gitea to version 1.27.1 or later as soon as possible. The fix addresses the hook installation vector in the diffpatch API. If you cannot upgrade immediately:
- Restrict network access to the diffpatch API endpoint using firewall rules or a reverse proxy
- Disable the API if it is not required for your workflow
- Audit existing repositories for unauthorized hooks
- Review server logs for suspicious diffpatch requests
After upgrading, verify that no unauthorized Git hooks exist in your repositories and rotate any credentials that may have been exposed.
Security Insight
This vulnerability follows a pattern of Git-related services exposing dangerous API endpoints that bypass normal authentication flows. The ability to install hooks through an API reflects a trust assumption that input validation alone cannot protect. Gitea’s rapid fix in 1.27.1 is commendable, but the exploit confirms that self-hosted development tools remain prime targets - they hold source code, credentials, and often sit on internal networks with elevated trust. Organizations should treat these platforms as critical infrastructure and apply the same patching urgency as they would for edge devices.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Public PoC References
Unverified third-party code
These repositories are publicly listed on GitHub and have not been audited by Yazoul Security. They may contain malware, backdoors, destructive payloads, or operational security risks (telemetry, exfiltration). Treat them as hostile binaries. Inspect source before execution. Run only in isolated, disposable lab environments (offline VM, no credentials, no production data).
Authorized use only. This information is provided for defensive research, detection engineering, and patch validation. Using exploit code against systems you do not own or do not have explicit written permission to test is illegal in most jurisdictions and violates Yazoul's terms of use.
| Repository | Stars |
|---|---|
| imbas007/CVE-2026-60004-POC CVE-2026-60004 Pre-Auth RCE Exploit — Gitea <= 1.27.0 diffpatch git hook injection (CVSS 9.8) | ★ 16 |
| HORKimhab/CVE-2026-60004 CVE-2026-60004 | ★ 4 |
| gagaltotal/CVE-2026-60004-poc-gitea CVE-2026-60004 — Gitea Pre-Auth RCE via diffpatch hook injection | ★ 2 |
| EQSTLab/CVE-2026-60004 Gitea diffpatch RCE | ★ 1 |
| 0xBlackash/CVE-2026-60004 CVE-2026-60004 | ★ 1 |
Showing 5 of 9 known references. Source: nomi-sec/PoC-in-GitHub.
Nuclei Detection Templates
Detection template available — your exposure is being scanned
The templates below are YAML signatures for the Nuclei scanner from ProjectDiscovery. They are not exploit code — they are detection rules that confirm whether a target is vulnerable. The presence of a Nuclei template means every bug bounty hunter, AppSec team, red team, and reconnaissance pipeline on the public internet is actively probing for this CVE.
Assume your exposed instances have already been touched. Patch immediately even if no exploitation is observed yet — fingerprinting precedes exploitation by days at most.
| Template | Source |
|---|---|
CVE-2026-60004.yaml | View YAML |
1 Nuclei template indexed for this CVE. Source: projectdiscovery/nuclei-templates.
Related Advisories
IBM Langflow OSS 1.0.0 through 1.10.0 allows unauthenticated attackers to chain /api/v1/auto_login (mints SUPERUSER tokens to any network caller) with /api/v1/validate/code (executes user code via exe...
Orkes Conductor 3.21.21 before 3.30.2 contains an unauthenticated remote code execution vulnerability that allows remote attackers to execute arbitrary OS commands by submitting inline workflow defini...
ai-scanner is an AI model safety scanner built on NVIDIA garak. From version 1.0.0 to before version 1.4.1, there is a remote code execution vulnerability via JavaScript injection in `BrowserAutomatio...
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.0, VM2 suffers from a sandbox breakout vulnerability. This allows attackers to write code which can escape from the VM2 sandbox and ...