3w ago · hacker-news
A critical remote code execution vulnerability in Gitea, tracked as CVE-2026-60004, allows authenticated users with repository write access to execute arbitrary shell commands by planting a malicious Git hook via a patch collision attack. The flaw affects Gitea versions 1.17 and later before 1.27.1, and exploitation is feasible on default installations due to open registration enabling unprivileged account creation. The vulnerability stems from improper handling of git apply in a bare repository during a diffpatch operation, allowing attackers to place executable hooks in the Git hooks directory. Although no in-the-wild exploitation has been confirmed, a public proof-of-concept exists, and successful exploitation could lead to full compromise of the Gitea service account, exposing secrets, repositories, and internal services.