CVECVE-2026-60004
CVSS 9.8
KEV addedAugust 26, 2026
(today)
Fed deadlineAugust 28, 2026
Fixed inGitea 1.27.1
Released July 27
Payload observedCrypto-miner
via automated
scanner
What happened
CISA added CVE-2026-60004 to its Known Exploited Vulnerabilities catalog on August 26, 2026, citing active exploitation and setting a federal remediation deadline of August 28. Gitea is a widely deployed open-source, self-hosted Git platform that provides version control, code review, CI/CD workflows, and team collaboration, written in Go and maintained as a community fork of Gogs. CVE-2026-60004 is a code injection vulnerability in Gitea's diffpatch API endpoint, which processes repository patches using underlying Git commands. An attacker with write access to any repository can submit a crafted patch to the endpoint twice: the first submission creates a temporary bare repository clone, and because the root of the clone serves as Git's directory, a file placed at hooks/post-index-change in the crafted patch becomes an active Git hook. When Git subsequently processes operations in that directory, the hook executes, running arbitrary shell commands with the privileges of the Gitea service account. The critical operational detail is that most Gitea installations ship with open user registration enabled by default, with no email confirmation and no CAPTCHA required. This converts the write-access precondition into one that any unauthenticated visitor can satisfy in seconds: register an account, create a repository, and submit the exploit. Gitea patched the flaw in version 1.27.1, released July 27, 2026. A public proof-of-concept was included in the July 28 advisory. The first confirmed exploitation is documented in an incident report by a developer published on the Russian collaborative blog Habr. An automated scanner registered an account on the victim's Gitea instance, created a repository, and triggered the exploit chain. The payload wrote a proof of RCE into a Git branch, then downloaded a shell loader and then a cryptocurrency miner that contested for CPU resources. Because the Gitea instance ran in Docker without a privileged container configuration, the miner payload did not survive container restarts. The attack timeline from the Habr report is approximately 30 days after the patch was available, consistent with an automated scanner that indexed the vulnerability after the CVE was published.
Why it matters
Gitea is used by developer teams, small enterprises, and government organizations as a self-hosted alternative to GitHub or GitLab. The source code, pipeline configurations, deploy keys, secrets stored in repository environment variables, and CI/CD credentials in a Gitea instance represent the same class of assets that the LiteLLM supply chain attack targeted in March: the keys to downstream software distribution and infrastructure. Code execution as the Gitea service account gives an attacker access to every repository on the instance, every secret stored in those repositories, and every deploy key and CI/CD credential configured in the system. The cryptocurrency miner in the first confirmed incident is the opportunistic payload; a more targeted attacker with the same access would extract credentials, inject code into repositories, or modify pipeline configurations to introduce malicious components into software that downstream users build or deploy from the affected Gitea instance.
Don't miss
This is the second Gitea vulnerability on CISA KEV in two months. CVE-2026-20896, a different Gitea flaw, was exploited in early July and has not yet been added to the KEV catalog. The pattern of two separate Gitea vulnerabilities attracting in-the-wild exploitation within a two-month period reflects both the growth of Gitea as a deployment platform and the consistent attacker interest in self-hosted development infrastructure documented across GitLab CVE-2026-19478, the LiteLLM Trivy chain, and the Gitea KEV history. Organizations running self-hosted Gitea that have not already updated to 1.27.1 should also disable open registration if it is not required for their use case. Open registration is the single configuration change that converts CVE-2026-60004 from a threat requiring insider access to a threat exploitable by any automated scanner that discovers the instance over the internet.
Potential actions
- Update Gitea to version 1.27.1 or later immediately. The federal deadline is August 28. Gitea Cloud instances were upgraded automatically as of July 27. Self-hosted instances running any version from 1.17 through 1.27.0 are vulnerable. Confirm the current version in the Gitea admin panel under Site Administration, Gitea Version, or by running the gitea --version command on the host.
- If immediate update is not possible, disable open user registration as an interim mitigation. In the Gitea admin panel, navigate to Site Administration, User Management, and disable the Allow Self-Registration setting. This removes the open-registration precondition that converts CVE-2026-60004 from a write-access exploit to one exploitable by any visitor. Any existing user with write access to a repository on an unpatched instance remains a risk; restrict repository write access to the minimum required accounts until the update is applied.
- For Gitea instances that were internet-accessible before today and running a vulnerable version, review repository activity logs for unexpected account registrations, repository creations, or anomalous API calls to the diffpatch endpoint. Check running processes and container logs for cryptocurrency mining activity, unexpected outbound network connections, or new Git hook files in repository directories.
The Sip
Write access required. But open registration is on by default. Any visitor can register, create a repository, and run this exploit. An automated scanner found the first known victim and dropped a miner in 30 days. Update to 1.27.1. If you cannot update today, turn off open registration. Deadline is Friday.