1-minute read of a 4 min report

Attackers Exploit Gitea Flaw to Run Code on Self-Hosted Servers

By

1-minute read

What a defender needs to know

CISA added CVE-2026-60004 to its Known Exploited Vulnerabilities catalog on August 25. The critical flaw affects Gitea 1.17 through 1.27.0 and lets a repository writer turn controlled patch content into a live Git hook. With default open registration, a visitor can create the account and repository needed to reach that path.

Submitting the same patch twice triggers Git’s three-way fallback inside a bare temporary clone. An executable hooks/post-index-change entry then sits in the live hook directory and runs as the Gitea service account. The primary sources do not name attackers, victims, or a post-exploitation payload.

The flaw was fixed in Gitea 1.27.1; upgrade to 1.27.2 or a newer supported release for additional security fixes. Inventory every active node with curl -fsS https://gitea.example/api/v1/version, then compare that response with the package, image digest, or binary the service manager starts. The expected result is 1.27.2 or newer everywhere. Check registration state and account-creation history. Review Gitea and reverse-proxy logs for repeated POST /api/v1/repos/<owner>/<repo>/diffpatch requests, then correlate them with new repositories, unusual branches, executable temporary files, and unexpected child processes under the Gitea service account. Preserve those records before cleanup because a patched version cannot establish whether the earlier process executed a hook.

Primary sources