Skip to content
Tech News
← Back to articles

Hackers now exploit critical Gitea flaw in code injection attacks

read original more articles
Why This Matters

The discovery of a critical security flaw in Gitea highlights the ongoing risks associated with self-hosted development tools, especially as attackers actively exploit these vulnerabilities to execute arbitrary commands. This underscores the importance for organizations and developers to promptly update their systems to prevent potential breaches and data compromises.

Key Takeaways

Attackers are actively exploiting a critical-severity vulnerability in the Gitea self-hosted Git service, according to the U.S. Cybersecurity and Infrastructure Security Agency (CISA).

Like cloud-hosted GitHub or GitLab SaaS (Software as a Service) platforms, Gitea provides a full suite of DevOps tools, but it is designed to be used as a self-hosted software development platform.

Tracked as CVE-2026-60004 and reported by Salesforce security researcher Shai Rod, this code injection security flaw allows an authenticated user with repository write access to repositories hosted on vulnerable servers to execute arbitrary shell commands with the privileges of the Gitea service account by submitting malicious patches via the diffpatch API endpoint.

However, default-configured Gitea instances have self-registration enabled, allowing unauthenticated attackers to register an account, create a new repository, and trigger the vulnerability without 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 explains.

"With default open registration, an unauthenticated visitor can obtain the required write access by registering an account and creating a repository."

Gitea released version 1.27.1 on July 27 to address CVE-2026-60004 and advised users to upgrade their servers as soon as possible.

Cybersecurity watchdog Shadowserver now tracks nearly 5,000 Gitea instances exposed online. However, there is no information on how many are honeypots or have already been secured against CVE-2026-60004 attacks.

Internet-exposed Gitea servers (Shadowserver)

Federal agencies ordered to patch within three days

... continue reading