Critical Gitea RCE Actively Exploited

Organizations running self-hosted Gitea instances are being urged to patch immediately after the U.S. Cybersecurity and Infrastructure Security Agency (CISA) added CVE-2026-60004 to its Known Exploited Vulnerabilities (KEV) catalog on…

Security News 6 min read

Critical Gitea RCE Actively Exploited

Organizations running self-hosted Gitea instances are being urged to patch immediately after the U.S. Cybersecurity and Infrastructure Security Agency (CISA) added CVE-2026-60004 to its Known Exploited Vulnerabilities (KEV) catalog on August 25, 2026.

The critical vulnerability carries a CVSS score of 9.8 and can allow attackers to execute arbitrary commands on vulnerable Gitea servers. CISA's decision to include the flaw in the KEV catalog means there is evidence that the vulnerability is being exploited in real-world attacks.

Gitea is a popular open-source Git hosting platform commonly deployed by organizations that want to manage source-code repositories within their own infrastructure.

What Happened?

The vulnerability, tracked as CVE-2026-60004, affects Gitea's diffpatch functionality.

According to Gitea's official security advisory, the vulnerable endpoint can be abused by a user with ordinary repository write access to install and execute a malicious Git hook. The resulting commands run with the privileges of the operating-system account used by the Gitea service.

Affected versions are Gitea 1.17 through 1.27.0

The vulnerability was fixed in Gitea 1.27.1. Gitea subsequently released version 1.27.2 on August 14, 2026, so organizations upgrading today should generally move to a currently supported patched release rather than stopping at the minimum fixed version.

CISA has set August 28, 2026 as the remediation deadline for affected U.S. federal civilian agencies.

How the Vulnerability Works

The issue originates in Gitea's:

POST /api/v1/repos/{owner}/{repo}/diffpatch

endpoint.

This feature allows patches to be applied to a repository. In vulnerable versions, Gitea processes attacker-controlled patches inside a temporary bare Git repository.

A bare repository differs from a normal Git working copy because its repository directory effectively becomes Git's control directory.

Under specific conditions, a carefully crafted patch can therefore cause an executable file to be placed inside Git's hooks directory. Git hooks are scripts that Git automatically executes when certain repository operations occur.

Gitea's advisory explains that the attack can manipulate this behaviour so that a malicious post-index-change hook is installed and subsequently executed.

The result is arbitrary command execution as the Gitea operating-system user.

Importantly, exploitation requires Git 2.32 or later, an enabled diffpatch route, and a temporary filesystem that is writable and executable.

Is the Vulnerability Really Unauthenticated?

Not directly.

The diffpatch endpoint requires repository write access. An attacker therefore needs permission to modify a repository before the vulnerable operation can be triggered.

However, Gitea's default configuration can significantly weaken this barrier.

Gitea's advisory notes that with open registration enabled, an external visitor can register a normal account, create a repository and automatically obtain write permissions to that repository.

That means an attacker who had no credentials before reaching the server may be able to create the access required for exploitation themselves.

For internet-facing Gitea servers that allow public registration and unrestricted repository creation, the distinction provides relatively little protection.

Active Exploitation Confirmed

The risk is no longer theoretical.

CISA added CVE-2026-60004 to the KEV catalog on August 25 after determining that there is evidence of active exploitation.

CISA has not publicly attributed the exploitation to a particular threat actor or disclosed detailed information about the attacks.

However, separate reporting has described at least one Gitea administrator who reportedly observed exploitation consistent with CVE-2026-60004.

According to that account, an exposed Gitea server with open registration was compromised and a script resembling a cryptocurrency-mining dropper was deployed. The affected server experienced sustained high CPU utilization before the hosting provider restricted its available resources.

The exact final payload, mining infrastructure, wallet, malware family and attacker identity were not confirmed, so the incident should not be treated as definitive attribution of a broader cryptojacking campaign.

It is also unclear whether that specific incident was the evidence that led CISA to add the vulnerability to KEV.

Why This Vulnerability Is Dangerous

Source-code platforms occupy a particularly sensitive position inside modern organizations.

A Gitea server may contain private repositories, application configuration, deployment scripts, infrastructure-as-code templates and credentials used by CI/CD systems.

According to the Gitea advisory, successful exploitation could potentially expose information accessible to the Gitea service account, including application secrets, process environment secrets, mounted repositories, database credentials, OAuth credentials and other connected internal services.

That makes compromise potentially more serious than losing control of a single server.

An attacker who gains access to development infrastructure may also attempt to interfere with source code, steal intellectual property, obtain credentials or use the compromised environment as a starting point for further attacks.

The exact impact ultimately depends on how the Gitea server is isolated and what privileges, secrets and network access have been granted to its service account.

What Organizations Should Do

Organizations operating Gitea should treat CVE-2026-60004 as an urgent remediation priority.

  • Upgrade immediately to Gitea 1.27.1 or later, preferably the latest stable release appropriate for your environment.
  • Check whether public account registration is enabled and disable it unless there is a legitimate business requirement.
  • Restrict who is allowed to create repositories and obtain repository write access.
  • Review access logs for unusual requests involving the /diffpatch API.
  • Investigate unexpected accounts or repositories created on internet-facing instances.
  • Monitor for unusual processes launched by the Gitea service account and unexplained CPU or network activity.
  • Review the server for unauthorized Git hooks, repository modifications and persistence mechanisms.
  • If compromise is suspected, treat credentials accessible to the Gitea process as potentially exposed and rotate relevant database, OAuth, CI/CD and integration secrets after containment.

Because exploitation has already been observed, simply installing the update may not be sufficient for systems that were previously exposed. Organizations should also determine whether attackers may have accessed the server before it was patched.

Development Infrastructure Is Part of the Security Perimeter

The incident highlights an increasingly important security issue: development platforms are high-value infrastructure.

Git servers are closely connected to source code, CI/CD systems, container registries, cloud environments and production deployment pipelines. Compromising one of these systems can therefore create opportunities far beyond the original vulnerable application.

Internet-facing development tools should consequently receive the same vulnerability-management, monitoring and access-control attention as other critical infrastructure.

Organizations should minimize unnecessary public exposure, disable unused functionality, restrict account creation and ensure security updates are deployed quickly when critical vulnerabilities are disclosed.

Final Thoughts

CVE-2026-60004 combines several dangerous characteristics: critical remote code execution, a publicly understood exploitation path, relatively easy access when open registration is enabled and now confirmed exploitation in the wild.

Organizations running Gitea 1.17 through 1.27.0 should upgrade without delay and review exposed instances for signs of previous compromise.

Development platforms and source-code repositories should be treated as critical infrastructure. Patch them quickly, restrict public access and never rely on an account requirement as a meaningful security boundary when public registration can provide that account automatically.

Blog

Security 4 min read

FortiMail Gateway Zero-Day Under Active Exploitation

Fortinet has warned customers that a critical zero-day vulnerability in FortiMail is being actively exploited in the wild, putting internet-exposed email security gateways at immediate risk.

AI 5 min read

MI5 Warns of CGTRI Front Linked to Chinese Intelligence

The U.K.’s domestic security service, MI5, has issued an unusually direct public warning about the China General Technology Research Institute (CGTRI), alleging that the research body has strong links to China’s Ministry of State…