CVE-2026-60004 in gitea

LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.

What the vulnerability is

Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.

Affected software: gitea

Scores

What LogPulse has for it

How to mitigate it

Upgrade Gitea to 1.27.1 for diffpatch git hook injection (CVE-2026-60004)

Patch or upgrade. A crafted patch sent to Gitea's diffpatch API can plant a Git hook that runs shell commands as the Gitea account. Upgrading to 1.27.1 fixes it; closing public sign-up limits who can try.

Applies to: Gitea before 1.27.1.

  1. Check the version under Site Administration > Dashboard or with `gitea --version`.
  2. Upgrade to Gitea 1.27.1 or later (binary, package or container image) and restart.
  3. If public registration is not needed, set DISABLE_REGISTRATION = true in app.ini.
  4. Check repositories for unexpected hooks: look in each repo's hooks/ directory for files other than Gitea's own pre-receive, update and post-receive wrappers.

Sources:

Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.

We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.

Start free with LogPulse