The vulnerability, tracked as CVE-2026-60004 and reported by Salesforce security researcher Shai Rod, is a code injection flaw in the diffpatch API endpoint. An attacker with write access to a repository can submit a malicious patch that installs and executes a Git hook, allowing arbitrary shell commands to run with the privileges of the Gitea service account.
Gitea comes with self-registration enabled by default, meaning an unauthenticated attacker can simply create an account, set up a new repository, and trigger the exploit without needing prior credentials. “Gitea's diffpatch endpoint can be abused to install and execute a Git hook from repository-controlled content. An attacker with ordinary write access to a repository can execute arbitrary shell commands as the Gitea OS user,” Gitea's security team explained in an advisory.
The Gitea project released version 1.27.1 on July 27 to address the flaw and urged administrators to upgrade immediately. Despite this, Shadowserver reported on August 27 that 8,393 unique IPs were still running vulnerable versions. The U.S. Cybersecurity and Infrastructure Security Agency (CISA) has also added CVE-2026-60004 to its catalog of known exploited vulnerabilities, signalling that federal agencies must patch promptly.
System administrators who run self-hosted Gitea instances are advised to update to version 1.27.1 or later, and to review access controls, particularly if self-registration is enabled in production environments.