Summary
| Parameter | Value |
|---|---|
| CVE ID | CVE-2026-60004 |
| Alert Source | CISA KEV - active exploitation |
| CVE Publication Year | 2026 |
| Date Published | 2026-08-25 |
| Vendor | Gitea |
| Product | Gitea |
| Affected versions | >= 1.17, < 1.27.1 |
| Fixed version | 1.27.1 |
| CVSS Score | not scored in NVD; GitHub Security Advisory rates it Critical |
| EPSS Score | No data |
| CISA KEV | Yes - confirmed active exploitation |
| Ransomware | Not confirmed |
| Remediation Deadline | 2026-08-28 |
Vulnerability Description
Gitea is a self-hosted Git server — the GitLab equivalent for organisations that keep source code on their own infrastructure.
The diffpatch endpoint (services/repository/files/patch.go) applies attacker-controlled
patches inside a shared bare temporary clone. Submitting the same patch twice creates an
add/add collision; Git’s three-way fallback then checks the indexed path out to disk even
though the operation uses --cached. In a bare clone the repository root is $GIT_DIR,
so an executable entry named hooks/post-index-change becomes a live Git hook. Git
invokes it while writing the index, and repository-controlled content executes as the
operating-system account running Gitea.
The attack only needs ordinary write access to one repository. With open registration enabled by default, an unauthenticated visitor obtains that access on their own — register an account, create a repository.
The proof of concept published with the advisory stores command output in Git objects and creates a result branch, so the attack requires no outbound connection from the server — detection based on egress traffic will not see it.
CISA added the vulnerability to the KEV catalog on 25 August 2026 with a remediation deadline of 28 August 2026.
Required Actions
- Upgrade Gitea to 1.27.1 or later — this is the only complete fix.
- If you cannot upgrade today: disable open registration
(
[service] DISABLE_REGISTRATION = trueinapp.ini). It does not remove the vulnerability, but it raises the bar from “anyone on the internet” to “an account holder”. - Restrict public network access to the Gitea instance — VPN or an IP allow list. A Git server holding source code rarely needs to face the whole internet.
- Because the flaw is actively exploited, check for compromise: files under repository
hooks/directories (especiallypost-index-change), unusual processes owned by the Gitea system account, accounts created through self-registration, fresh repositories created by unknown users, and changes to SSH keys and API tokens. - If compromise is confirmed, treat every secret in repositories and CI/CD as disclosed — the Gitea system account can reach the entire repository store.
Who Is Affected?
Organisations running their own Gitea instance. It shows up wherever source code cannot leave the organisation’s infrastructure: public sector, banking and insurance, R&D teams, and software vendors serving customers with on-premise requirements. It is also frequently stood up bottom-up by development teams as a “lightweight GitLab” — and in that case it usually falls outside the asset register covered by vulnerability management.
A Git server is a high-value target: it holds source code, history, deployment configuration and very often secrets. Code execution on that host is equivalent to access to the organisation’s intellectual property and to its software supply chain.
Sources
Need help securing your systems? nFlo team offers vulnerability management and 24/7 SOC services. Contact us.
