Exploited Known exploited (KEV) CVE-2026-60004

Code injection in Gitea (CVE-2026-60004) — planting a Git hook that runs as the service account

Gitea Gitea Added to KEV Aug 25, 2026 Federal remediation due 2026-08-28

Gitea, self-hosted Git hosting, contains a flaw allowing an attacker with repository write access to send a crafted patch to the diffpatch API, plant an executable Git hook, and run shell commands as the Gitea service account. CISA added it to the KEV catalog on 2026-08-25 with a due date of 2026-08-28.

Key facts

  • CVE IDCVE-2026-60004
  • Affected (vendor / product)Gitea Gitea
  • CWECWE-94
  • ExploitationListed in CISA KEV (exploitation confirmed)
  • Remediation due2026-08-28 (U.S. federal civilian agencies, BOD 22-01)

Key points

  • The affected product is Gitea; the name is "Gitea Code Injection Vulnerability," CWE-94.
  • An attacker with repository write access can send a crafted patch to the diffpatch API and plant an executable Git hook.
  • Execution happens as the Gitea service account — covering every repository and Gitea's own configuration and database.
  • Git hooks are scripts that run automatically on defined events such as commits or pushes; the "place it and it runs" property is what is targeted.
  • Added to KEV 2026-08-25 with a due date of 2026-08-28. This site also holds a flaw in the artifact repository JFrog Artifactory.
  • An attacker holding write access to one repository moves, through a Git hook, to privilege over the whole server.

1Git hooks as an execution mechanism

Git has a mechanism called hooks: scripts that run automatically when a defined event occurs — before or after a commit, on receiving a push. They exist to automate format checks, notifications, and build triggers. Turned around, though, it means that placing an executable file where hooks live causes code to run the moment that event happens. What an attacker targets is exactly that property: put it there and it runs.

2Running "as the service account"

The catalog states plainly that execution happens as the Gitea service account. That account holds rights over the files of every hosted repository and over Gitea's own configuration and database. So an attacker holding write access to one repository can move from there to privileges over the whole server.

Handing someone write access to a single repository must not amount to handing over the server — and that boundary is broken.

3Development infrastructure as a target

Gitea is chosen where an organization wants to manage source code itself rather than through a cloud service. Source code, build configuration, and often deployment credentials gather there. When development infrastructure is breached, the effect does not stay on that server; it can spread into whatever is distributed from it.

This site separately holds a flaw in an artifact repository (JFrog Artifactory), so products sitting in the development supply chain can be seen landing in KEV in succession.

4The property that placing it makes it run

A Git hook is a script that runs automatically when a defined event occurs. It exists for automation, and that property is exactly what the attack uses.

  1. 1Write into the hook directoryWrite access to one repository is enough
  2. 2A defined event occursBefore or after a commit, on receiving a push
  3. 3The script runs automaticallyThe property that placing it makes it run is used as it is
  4. 4It runs as the service accountThat account reaches every repository's files and Gitea's own configuration and database

An attacker holding only write access to one repository can move from there to privilege over the whole server. Handing over privilege on one repository must not amount to handing over privilege on the server — and that boundary is broken. Write access to a repository is distributed fairly widely inside an organisation, which changes how the weight of the precondition should be judged.

Why it matters

Repository write access is distributed fairly widely inside an organization, so a flaw that turns it into privileges over the whole server changes how the precondition should be weighed. Updating development infrastructure means pausing builds and tends to be deferred, yet a broken privilege boundary is a reason to raise priority. Taking inventory of which users and automation tools hold write access supports estimating the blast radius.

FAQ

What is a Git hook?
A script that runs automatically when a defined event occurs, such as before or after a commit or on receiving a push. Hooks are used to automate format checks, notifications, and build triggers.
Why is repository write access alone dangerous here?
Because planting a hook means execution happens as the Gitea service account, so a permission over one repository turns into privileges over the whole server.
Is self-hosted Git riskier than cloud?
It is not a question of more or less risk but of where responsibility sits. Self-hosting makes applying updates and reviewing settings the operator's job.

Sources (primary)

This article is an independent organization based on the U.S. official data below. Always verify the exact, latest details and applicability with the official and vendor sources.

#Security#CISA#KEV#Gitea#Git hooks#Development infrastructure#Supply chain
Disclaimer: This site independently summarizes and classifies information based on official data sources. Always verify the latest and accurate information with the official sources. Content on finance, health, legal, and security is information, not advice. This site is not an official website of the U.S. government.