inferwire
/
Cybersecurity·1 min read

Gitea Remote Code Execution Flaw Exploited; Fixed in 1.27.1

CVE-2026-60004 lets attackers run code on Gitea servers before version 1.27.1 through the diffpatch API and Git hook installation. CISA listed it as exploited before NVD even published it.

TL;DR

  • CVE-2026-60004 lets attackers achieve remote code execution on Gitea before version 1.27.1 via the diffpatch API, through Git hook installation [^1].
  • It scores 9.8, critical, and CISA added it to its Known Exploited Vulnerabilities catalog on August 25, a day before NVD published it [^1].

Background

Gitea is self-hosted software for running Git repositories, a lightweight alternative to GitHub or GitLab that many teams run on their own servers. Git hooks are scripts that run automatically on certain repository events, which makes the ability to install one equivalent to running code on the server. CISA's Known Exploited Vulnerabilities (KEV) catalog lists flaws with confirmed exploitation in the wild [^1].

What happened

According to NVD, Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation [^1]. It is classified as code injection (CWE-94) and scores 9.8 under CVSS 3.1 [^1].

CISA added it to its catalog on August 25 and gave federal agencies until August 28; NVD's entry followed on August 26 [^1].

Why it matters

A code hosting server holds a team's source code and often the secrets that live alongside it, such as deployment keys and CI credentials. Code execution there can mean tampering with the code itself, not just stealing it. The fact that exploitation was confirmed before the public entry appeared shows how little lead time defenders may get.

Practical example

Say a small company hosts its code on a Gitea server that hasn't been updated to 1.27.1. An attacker who uses this flaw can get a Git hook installed and have their own code run on the server [^1]. From there they could read every repository or slip changes into one. Upgrading to 1.27.1 closes the hole; auditing installed hooks shows whether it was already used.

Sources

  1. [1]NVD — CVE-2026-60004