Technical impact
A freshly created repository that uses auto‑initialization can accept a push before the initialization process has finished. An attacker who can create repositories can push a crafted file tree during this window; when the server writes the README, it follows a symbolic link that points to the repository’s git hook directory, overwriting the pre‑existing hook. Git hooks run with the permissions of the Gitea system user, giving the attacker arbitrary command execution. This flaw is a classic race condition that allows privilege escalation on the host machine.
Affected Systems
All installations of Gitea that permit users to create new repositories are potentially affected. Specific version information is not provided in the advisory; the fix was released with Gitea 28.4.0, so any earlier version that still enables auto‑initialization may be vulnerable.
Risk and Exploitability
The exploit requires only the ability to create a repository and push an initial commit, so it is widely accessible to users with that privilege. No EPSS score is available and the vulnerability is not listed in the CISA KEV catalog, but the impact is severe; the CVSS score is not disclosed, yet the nature of the flaw suggests high severity. Attackers can achieve remote code execution by overwriting server‑side git hooks, compromising the control plane of the Gitea instance. Timing of the push relative to the auto‑initialization is critical, but the race window is long enough for a determined attacker to succeed.