PT-2026-65725

CVE-2026-60004

·

Published

2026-07-28

·

Updated

2026-11-15

Description by

CVSS 2.0
10
Critical
MetricsAV:N/AC:L/Au:N/C:C/I:C/A:C
Name of the Vulnerable Software and Affected Versions Gitea versions 1.17 through 1.27.0
Description A critical remote code execution issue exists in the diffpatch API endpoint. The flaw allows an attacker with repository write access to install a malicious Git hook, specifically hooks/post-index-change, which is then executed by the Gitea service account. This occurs because Gitea applies patches in a bare temporary clone using git apply -3. When the same crafted patch is submitted twice, an add/add collision triggers a three-way merge that writes the payload directly to the active hooks directory in the $GIT DIR.
On instances where open user registration is enabled, unauthenticated attackers can exploit this by registering an account and creating their own repository to gain the necessary write permissions.
This issue has been actively exploited in a multinational campaign by a threat actor known as Red Heron. The actor scanned over 1,800 instances globally, targeting sectors such as defense, energy, aerospace, and government in countries including Canada, Argentina, Taiwan, the United States, Sri Lanka, and Qatar. Post-exploitation activities included source-code theft, credential collection using bcrypt, and the deployment of the JITTERLY Linux implant and SIXZUT LD PRELOAD rootkit to maintain persistence and hide activity by filtering filesystem and network data.
Recommendations Update Gitea to version 1.27.1 or newer. Disable open user registration to prevent unauthorized attackers from creating accounts and repositories. Restrict public internet exposure of Gitea instances, utilizing a VPN or proxy for access.
Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-RCR6-4JQH-J84M
BIT-GITEA-2026-60004
GO-2026-6433
OPENSUSE-SU-2026:21897-1
SUSE-SU-2026:23855-1
SUSE-SU-2026:23863-1
Found an issue in the description? Have something to add? Feel free to write us 👾