FORSMILE
JA
セキュリティ2026/08/27

[URGENT] Gitea CVE-2026-60004: Upgrade to 1.27.1 Now — Actively Exploited RCE

Gitea 1.17 through 1.27.0 lets an attacker plant a live Git hook through the diffpatch API and run commands as the Gitea service account. CISA added it to KEV on August 25 with an August 28 due date. Affected versions, real preconditions, and checks.

← Back to Blog

Short answer. If you self-host Gitea 1.17 through 1.27.0, upgrade to 1.27.1 today. CISA added this flaw to the Known Exploited Vulnerabilities (KEV) catalog on August 25, 2026 and set a remediation due date of August 28, 2026 for US federal agencies. It is remote code execution that is already being exploited in the wild, and the maintainers published no workaround — upgrading is the only fix.

What actually happens

Submitting the same patch twice to Gitea's `diffpatch` API creates an add/add collision. Git then falls back to its three-way merge path, which checks out indexed paths even during cached operations. Because a bare repository uses `$GIT_DIR` as its root, an executable entry named `hooks/post-index-change` becomes a live Git hook. From there the attacker's commands run as the Gitea service account.
The advisory states that this exposes application secrets, database credentials, mounted repositories, and OAuth tokens.

⚠ CVE Score — 最高危険度 / CRITICAL
9.8CRITICALCVSS v3.1CVE-2026-60004

Get the preconditions right

The CVSS 3.1 vector is `AV:N/AC:L/PR:N/UI:N`, but that `PR:N` assumes an instance where anyone can register. The advisory states the attacker needs either write access to an existing repository, or the ability to create a new one. Gitea allows open registration by default, so on a default instance an effectively unauthenticated attacker does meet the condition. CISA, by contrast, describes the same flaw as requiring "repository write access".
Closing registration does not close the hole: any existing account with write access still satisfies the precondition. Do not treat "registration is disabled" as safe.

Affected and fixed releases

  • ▸Affected: Gitea 1.17 through 1.27.0 (inclusive)
  • ▸Fixed: Gitea 1.27.1
  • ▸The MITRE CVE record expresses this as version 1.17, lessThan 1.27.1
  • ▸CWE-94 (Improper Control of Generation of Code)

Checks to run now

  • ✓Confirm the running Gitea version and upgrade to 1.27.1 or later
  • ✓If the upgrade will take time, confirm whether the instance is reachable from the Internet
  • ✓Inventory accounts with repository write access, and review whether open registration is enabled
  • ✓Inspect each repository's hooks directory for executable files you did not create
  • ✓Investigate unexpected processes owned by the Gitea service account and any credential exposure in its config
  • ✓If you find signs of exposure, rotate OAuth tokens and database credentials after upgrading
bash
# Check the running version
gitea --version

# If you run it under Docker
docker exec <container-name> gitea --version

Exploitation status and deadline

CISA added the CVE to KEV on August 25, 2026, with a due date of August 28, 2026. Known ransomware campaign use is listed as "Unknown". runZero reports that there is evidence CVE-2026-60004 is being actively exploited in the wild.
Worth noting: the KEV listing (August 25) came before the NVD record was published (August 26). "It is not in NVD yet, so we can wait" is not a viable position on this one.

Where the score comes from

The 9.8 in this article is the CVSS 3.1 value supplied by MITRE as the assigning authority, as shown on NVD. As of August 27, 2026 the NVD entry is still marked "Undergoing Analysis", meaning NVD has not yet published its own primary assessment. If NVD later scores it independently, the number or severity band may change. If you open NVD and see a different figure, this is why.

The other fix in 1.27.1

Gitea's release announcement states that 1.27.1 also contains a second security fix: an unauthenticated arbitrary file read via the Org-mode `#+INCLUDE` directive. However, at the time of checking, the identifier assigned to that issue was present in neither NVD nor MITRE. This site does not publish identifiers it cannot verify, so no number is given here. Either way, upgrading to 1.27.1 resolves both issues.

Official sources

Related articles
[Urgent] Apache Roller CVE-2026-129448: Added to CISA KEV on Nov 20 — Unauthenticated Code Execution Through the XML-RPC Endpoint, Before Any Login. Versions 4.0.0–6.1.5 Affected; Upgrade to 6.1.6 or Later. Turning XML-RPC Off in the Admin UI Is Not Enough (CVSS v3.1 9.8)2026/11/24[Urgent] VMware vCenter CVE-2026-123890: Added to CISA KEV on Nov 20 — Authentication Bypass Lets an Attacker In as Administrator; Mandiant Reports Exploitation in Early September, No Workaround, Patch Required (CVSS v3.1 9.8)2026/11/23[Urgent] Apache Axis 1.x CVE-2026-90436: Added to CISA KEV on Nov 18 — Axis Embedded in Confluence Data Center and Others Is Being Attacked; Unauthenticated Code Execution Possible. Confluence Fix Is 9.2.28; No Fixed Axis 1.x Release (CVSS v3.1 9.8)2026/11/20[Urgent] LiteLLM CVE-2026-40217: Added to CISA KEV (Nov 18) — The Guardrail Test API Sandbox Can Be Escaped to Run Code on the Proxy; Update to 1.83.11 or Later (CVSS v3.1 8.8)2026/11/19[Urgent] UnrealIRCd CVE-2026-114713: Added to CISA KEV on Nov 13 — On IRC Networks With Two or More Linked Servers, Any User May Run Commands With Server Authority; Fixed in 6.2.7.1 or With a Hot-Patch (CVSS v3.1 7.7)2026/11/17