
⚠ HIGH PRIORITY — CISA KEV (Aug 25, 2026). CVE-2026-60004 is a critical code-injection flaw in Gitea's /api/v1/repos/{owner}/{repo}/diffpatch endpoint. Attackers plant executable Git hooks via add/add patch collision — achieving RCE as the Gitea OS user. Miner-like payloads observed in active exploitation.
Affected Gitea
- Gitea versions 1.17 through 1.27.0
- Self-hosted Gitea on Linux with open registration enabled
- Git 2.32+ and writable
/tmpon the Gitea server
Check version
gitea --version
curl -s http://127.0.0.1:3000/api/v1/version
grep DISABLE_REGISTRATION custom/conf/app.iniPatching Method
- Upgrade Gitea to 1.27.1 or later immediately.
- Stop Gitea service:
systemctl stop gitea. - Replace binary or pull new Docker image (
gitea/gitea:1.27.1). - Start service and verify version in admin UI.
- Disable open registration: set
DISABLE_REGISTRATION = truein app.ini. - Hunt for rogue Git hooks in repository bare dirs and
/tmp. - Rotate Gitea admin token, DB password, and SSH deploy keys.
gitea --version
grep -r 'pre-receive\|post-receive' /var/lib/gitea/data/gitea-repositories/ | headUntil patched
- Take Gitea offline if upgrade cannot happen today
- Block
/api/v1/repos/*/diffpatchat reverse proxy - Disable user registration and freeze new repo creation
CVSS: 9.8 Critical. Federal deadline: 28 Aug 2026.