CVE-2026-60004 is a critical remote code execution (RCE) vulnerability in Gitea
CVE-2026-60004 is a critical remote code execution (RCE) vulnerability in Gitea, the self-hosted Git platform. It has a CVSS score of 9.8 (Critical).
Summary
- Affected software: Gitea
- Affected versions: 1.17 through 1.27.0 (fixed in 1.27.1)
- Impact: An attacker with repository write access can execute arbitrary shell commands as the Gitea service account.
- Severity: Critical (CVSS 9.8)
How it works
The vulnerability exists in Gitea's
diffpatch API endpoint. By submitting specially crafted patches, an attacker can cause a malicious Git hook (hooks/post-index-change) to be created and executed within a temporary bare repository clone. This results in command execution on the server running Gitea.Why it's dangerous
Many Gitea installations allow public registration by default. In those deployments, an external user may be able to:
- Create an account.
- Create a repository.
- Obtain repository write access.
- Exploit the vulnerability to execute commands on the server.
Successful exploitation may expose:
- Application secrets
- Database credentials
- OAuth tokens
- Environment variables
- Hosted repositories
- Potentially the underlying server itself
Mitigation
- Upgrade immediately to Gitea 1.27.1 or later.
- Disable or tightly restrict public registration until patching is complete.
- Review repository write permissions and follow least-privilege principles.
- Monitor Gitea and Git logs for suspicious patch submissions or unexpected hook activity.
Exploitation status
As of 29 July 2026, public proof-of-concept information is available, but reports indicate no confirmed in-the-wild exploitation has been disclosed.
If you'd like, I can also provide:
- Technical root-cause analysis
- Indicators of compromise (IOCs)
- Detection rules (Sigma/YARA)
- Patch validation steps for Gitea environments.

Comments
Post a Comment