CVE-2026-60004: Gitea: Remote Code Execution via diffpatch Git Hook Installation
Gitea’s diffpatch endpoint can be abused to install and execute a Git hook from repository-controlled content.
An attacker with ordinary write access to a repository can execute arbitrary shell commands as the Gitea OS user. With default open registration, an unauthenticated visitor can obtain the required write access by registering an account and creating a repository.
References
- blog.gitea.com/release-of-1.27.1
- github.com/0xBlackash/CVE-2026-60004
- github.com/advisories/GHSA-rcr6-4jqh-j84m
- github.com/go-gitea/gitea/commit/470d34b1de87d901bd9135564d5ee18c0d339e82
- github.com/go-gitea/gitea/commit/d7bc52beeadff4be5f5690de4d5de42abd10affe
- github.com/go-gitea/gitea/pull/38637
- github.com/go-gitea/gitea/pull/38638
- github.com/go-gitea/gitea/releases/tag/v1.27.1
- github.com/go-gitea/gitea/security/advisories/GHSA-rcr6-4jqh-j84m
- nvd.nist.gov/vuln/detail/CVE-2026-60004
- www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-60004
- www.runzero.com/blog/gitea
Code Behaviors & Features
Detect and mitigate CVE-2026-60004 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →