← Vulnerability feed

Vulnerability record · CVE-2026-60004 · published 26 August 2026

CVE-2026-60004: Gitea diffpatch API code injection enables remote code execution

Gitea · Gitea

Gitea before 1.27.1 allows remote code execution through the diffpatch API by way of Git hook installation. The flaw is a code injection issue (CWE-94) that lets an unauthenticated network attacker run code on the server, which matters because Gitea instances are often internet-facing and hold source code and CI credentials.

9.8 CVSS 3.1 Critical CISA KEV since 25 Aug 2026 EPSS 24% · top 2.2% CWE-94 · Code injection
9.8CVSS 3.1 base score
24%EPSS exploitation probability, 30 days
YesIn CISA KEV, fix deadline passed
1Affected product versions listed by NVD
5References, 2 tagged exploit
27 Aug 2026Last modified by NVD

Description

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

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

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 17 September 2026. Confidence: high.

critical priorityUnauthenticated network-reachable remote code execution with a CVSS score of 9.8, KEV listing and very high EPSS probability.

What it is

Gitea before 1.27.1 allows remote code execution through the diffpatch API by way of Git hook installation. The flaw is a code injection issue (CWE-94) that lets an unauthenticated network attacker run code on the server, which matters because Gitea instances are often internet-facing and hold source code and CI credentials.

Impact

An attacker gains arbitrary code execution on the Gitea host, with high impact to confidentiality, integrity and availability. That can lead to theft of repositories, tokens and secrets, or full compromise of the server.

Attack surface

Reached over the network through the diffpatch API; the CVSS vector indicates no authentication (PR:N) and no user interaction (UI:N) are required. Any Gitea instance exposing the API is potentially reachable.

Exploitation

CVE-2026-60004 is listed in CISA KEV with a due date of 2026-08-28, and EPSS gives a 30-day probability of 0.86777 (99.7th percentile). Public exploit and mitigation references exist, and KEV does not record ransomware campaign use.

What to do

  • Upgrade Gitea to 1.27.1 or later, following the vendor release notes and security advisory.
  • If patching cannot be done immediately, restrict or disable access to the diffpatch API and limit Git hook installation paths per vendor guidance.
  • Remove internet exposure of the Gitea web/API interface where feasible, placing it behind authentication and network controls.
  • Apply CISA BOD 26-04 required actions, including the stated forensics triage requirements, and discontinue use of the product if mitigations are unavailable.
  • Audit repository and server-side Git hooks for unauthorized additions or modifications.

Detection

  • Review Gitea and reverse-proxy logs for anomalous requests to the diffpatch API endpoint, especially from unexpected source addresses.
  • Monitor filesystem changes to Git hook directories and Gitea configuration for newly created or altered hook scripts.
  • Alert on unexpected child processes spawned by the Gitea service account, such as shells or interpreters.
  • Check for outbound connections or credential access from the Gitea host that do not match normal operation.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Exploitation in the wild

CISA added CVE-2026-60004 to the Known Exploited Vulnerabilities catalog on 25 August 2026 as "Gitea Code Injection Vulnerability". Required action: Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines. Federal deadline 28 August 2026.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2026-60004 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2022-42968Gitea argument injection vulnerabilityGitea before 1.17.3 does not sanitize and escape refs in the git backend. Arguments to git commands are mishandled.EPSS 1.2%9.8CVE-2021-45331Gitea improper authentication vulnerabilityAn Authentication Bypass vulnerability exists in Gitea before 1.5.0, which could let a malicious user gain privileges. If captured, the TOTP code for…EPSS 1.4%9.8CVE-2021-45330Gitea vulnerabilityAn issue exsits in Gitea through 1.15.7, which could let a malicious user gain privileges due to client side cookies not being deleted and the sessio…EPSS 1.4%9.8CVE-2021-45327Gitea interpretation conflict vulnerabilityGitea before 1.11.2 is affected by Trusting HTTP Permission Methods on the Server Side when referencing the vulnerable admin or user API. which could…EPSS 2.1%9.8CVE-2020-28991Gitea vulnerabilityGitea 0.9.99 through 1.12.x before 1.12.6 does not prevent a git protocol path that specifies a TCP port number and also contains newlines (with URL …EPSS 1.7%9.8CVE-2019-11576Gitea improper authentication vulnerabilityGitea before 1.8.0 allows 1FA for user accounts that have completed 2FA enrollment. If a user's credentials are known, then an attacker could send th…EPSS 1.8%9.8CVE-2018-18926Gitea vulnerabilityGitea before 1.5.4 allows remote code execution because it does not properly validate session IDs. This is related to session ID handling in the go-m…EPSS 3.0%9.1CVE-2026-20912Gitea improper access control vulnerabilityGitea does not properly validate repository ownership when linking attachments to releases. An attachment uploaded to a private repository could pote…EPSS 0.46%

Source: NIST National Vulnerability Database (record CVE-2026-60004), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.