CISA added a Gitea bug to its Known Exploited Vulnerabilities catalog on August 25, and the federal deadline to patch it is August 28 — three days. The vulnerability, CVE-2026-60004, lets anyone with a free account on an open-registration Gitea instance plant a git hook that runs as the server itself, no pre-existing credentials required. One admin found out the hard way: his hosting provider emailed him because his server had been pegged above 70% CPU for hours. It wasn't a backup job. It was a cryptominer.
How the diffpatch bug actually works
Gitea's diffpatch endpoint applies a submitted patch inside a temporary repository before showing you the diff. A specially crafted patch can smuggle a git hook — a script git runs automatically at certain points in its own lifecycle — into that temporary repo. When Gitea's internal git operations touch the repo afterward, the hook fires with the privileges of the Gitea service account. Researcher Shai Rod, who goes by NightRang3r, is credited with the discovery. The official fix, published as GHSA-rcr6-4jqh-j84m, landed in Gitea 1.27.1 on July 29.
CVE-2026-60004 at a glance
CVSS score
Detail
9.8 / Critical (CWE-94, command injection)
Affected versions
Detail
1.17 through anything below 1.27.1
Patched version
Detail
1.27.1, released July 29, 2026
Attack vector
Detail
Repository write access via the diffpatch endpoint + git hook
Auth required
Detail
Yes — but self-service if open registration is enabled
CISA KEV added
Detail
August 25, 2026
Detail
CVSS score
9.8 / Critical (CWE-94, command injection)
Affected versions
1.17 through anything below 1.27.1
Patched version
1.27.1, released July 29, 2026
Attack vector
Repository write access via the diffpatch endpoint + git hook
Auth required
Yes — but self-service if open registration is enabled
CISA KEV added
August 25, 2026
The part that makes this worse than a normal RCE
Most RCE bugs need something first — stolen credentials, an admin account, a phished token. This one doesn't, if the install still has Gitea's default of open registration turned on. An attacker signs up for a free account, creates a repository, uploads a malicious patch, and waits for Gitea's own internal git housekeeping to trigger the hook. My honest take: this is the same failure pattern that's burned self-hosted git forges before — Gogs shipped a nearly identical path-traversal RCE a few weeks ago, and the fix there was just as blunt: patch, or disable public signup. If you're running either tool exposed to the internet with open registration on, you're one PoC copy-paste away from being the next HOSTKEY email.
Self-hosted git forges like Gitea often sit on internet-facing servers with far less monitoring than a managed platform. · Unsplash
Timeline: three weeks from patch to KEV listing
How it played out
Jul 29, 2026
Gitea 1.27.1 ships, fixing CVE-2026-60004 (CVSS 9.8) via advisory GHSA-rcr6-4jqh-j84m.
Early Aug 2026
Proof-of-concept exploit code for the diffpatch/git-hook chain goes public.
Aug ~20, 2026
Developer Andrey (@Causelof) is alerted by hosting provider HOSTKEY after his Gitea server's CPU usage sits above 70% for an extended stretch.
Aug 25, 2026
CISA adds CVE-2026-60004 to its Known Exploited Vulnerabilities catalog.
Aug 28, 2026
Deadline for U.S. federal civilian agencies to patch under CISA's binding directive.
What actually happened on that one server
Andrey's account of it, picked up by The Hacker News, is a decent case study in how unglamorous most successful attacks are. His instance had open registration on, no email confirmation, OpenID signup enabled, and no sign-in requirement to view pages — a fairly common self-hosted setup for a small team that never expected to be a target. The payload wasn't sophisticated. It didn't need to be.
Cleared environment variables to strip logging and monitoring hooks
Enumerated running processes and killed anything already eating CPU, including competing miners
Fetched an architecture-specific binary payload from an external host
Executed it, then deleted itself from disk to reduce forensic evidence
What to do right now
Upgrade to Gitea 1.27.1 or later — this is the only complete fix.
2
If you can't patch immediately, disable public/open registration as a stopgap, not a solution.
Check CPU baselines on your Gitea host now — a sustained spike above what your team normally generates is the same tell that caught this attack.
4
Audit existing repository write access. Anyone who already had it before you patch could still trigger the hook.
5
Read Gitea's own advisory, GHSA-rcr6-4jqh-j84m, for the exact mechanics if you maintain a fork or a heavily customized instance.
Gitea RCE: quick answers
Is my Gitea instance affected?
Any release from 1.17 up to (but not including) 1.27.1 is vulnerable. Check your version in the admin panel or gitea --version and upgrade if you're below 1.27.1.
Do I need open registration enabled to be at risk?
No — an attacker with any existing repository write access can trigger it. Open registration just means they don't need you to give them that access first.
What does successful exploitation actually get an attacker?
Arbitrary command execution as the Gitea service account — which typically means read and write access to every repository the instance hosts, plus whatever the host filesystem otherwise exposes.
Is GitHub.com or GitLab.com affected?
No. This is specific to self-hosted Gitea deployments — GitHub.com and GitLab.com run unrelated codebases.
This one's going to keep showing up in incident write-ups for a while, mostly because self-hosted git forges are exactly the kind of infrastructure that gets stood up once and then forgotten. If your team spun up a Gitea instance two years ago for a side project that's since become load-bearing, this is the week to go check its version number. We've been tracking the same pattern in other self-hosted dev tooling — n8n's authenticated RCE bug and the LiteLLM/Trivy supply-chain leak both trace back to the same root cause: internet-facing dev infrastructure nobody budgeted ongoing patch-cycle time for. It's also worth remembering that the people probing servers like this one increasingly aren't doing it by hand — see our look at how attackers are automating exploitation with AI for why 'small, obscure self-hosted tool' isn't the protection it used to be.