Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. gitea.dev
  4. ›
  5. CVE-2026-60004

CVE-2026-60004: Gitea: Remote Code Execution via diffpatch Git Hook Installation

September 8, 2026

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 →

Affected versions

All versions starting from 1.17.0 before 1.27.1

Fixed versions

  • 1.27.1

Solution

Upgrade to version 1.27.1 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

go/gitea.dev/CVE-2026-60004.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:44 +0000.