CVE-2026-60004: critical vulnerability in Gitea
Published · Updated
Patch now. It under exploitation confirmed by CISA and has a working public exploit.
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.
Gitea versions before 1.27.1 have a critical flaw where attackers can run malicious code on the server through the diffpatch API by exploiting Git hook installation. This allows complete control over the server without needing valid user credentials.
CWE-94 (Improper Control of Generation of Code) in Gitea's diffpatch API fails to validate Git hook operations, permitting unauthenticated remote code execution. An attacker can craft malicious requests to install arbitrary Git hooks that execute during repository operations, achieving arbitrary command execution with server privileges.
In the same product, most dangerous first.