Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsTraining
StudyProjectsNewsletterHire MeAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Training
Study
Projects
Newsletter
Hire Me
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

2567+ Articles
161+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Checklists
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. News
  3. Critical Gitea RCE Actively Exploited as Reported Attack Drops Miner-Like Payload
Critical Gitea RCE Actively Exploited as Reported Attack Drops Miner-Like Payload
NEWS

Critical Gitea RCE Actively Exploited as Reported Attack Drops Miner-Like Payload

CVE-2026-60004 lets any registered Gitea user hijack the server via a Git hook injection; CISA adds it to KEV after a reported miner deployment.

Dylan H.

News Desk

August 26, 2026
2 min read

Overview

The U.S. Cybersecurity and Infrastructure Security Agency (CISA) has warned of active exploitation targeting a critical remote code execution flaw in Gitea, the popular self-hosted Git service. Tracked as CVE-2026-60004 (CVSS 9.8), the vulnerability allows any user with ordinary repository write access — including a newly self-registered account on instances with open registration — to execute arbitrary shell commands as the Gitea OS user.

Federal agencies have been given until August 28, 2026, to patch under CISA's Known Exploited Vulnerabilities (KEV) catalog mandate.


Technical Details

FieldValue
CVE IDCVE-2026-60004
CVSS Score9.8 (Critical)
Affected VersionsGitea >= 1.17, < 1.27.1
Fixed InGitea 1.27.1
Discovered ByShai Rod (NightRang3r)
CISA KEV Deadline2026-08-28

Root Cause: Git Hook Injection via Diffpatch

The vulnerability lives in Gitea's diffpatch endpoint, which applies attacker-controlled patch content inside a bare temporary clone. By submitting the same patch twice, an attacker triggers an add/add merge collision. Git's three-way merge fallback then writes attacker-supplied content into the repository's hook directory as a live Git hook named post-index-change — a hook Git executes automatically whenever it updates the index.

Because the hook runs with the privileges of the Gitea OS process, this converts a routine repository operation into arbitrary command execution — no admin access, no plugin, and no server misconfiguration required. On instances with open self-registration enabled (a common default), an unauthenticated visitor can obtain the write access needed to trigger the chain simply by signing up and creating a repository.


Exploitation in the Wild

A full-stack developer reported on the Russian blogging platform Habr that their self-hosted Gitea instance was compromised using CVE-2026-60004 to drop a cryptocurrency-miner-like payload. The compromise surfaced only after hosting provider HOSTKEY flagged the virtual server for sustained CPU usage above 70% — a service-terms violation that triggered automatic resource throttling before the owner noticed anything was wrong.

It remains unclear whether CISA's KEV addition stems specifically from this miner incident or from separate telemetry showing broader exploitation against unpatched, internet-facing Gitea servers. No prior evidence of active exploitation for this CVE had surfaced before the miner report. A working proof-of-concept is now public on GitHub, lowering the bar for opportunistic attackers.

This is not Gitea's first brush with active exploitation this year — a separate flaw, CVE-2026-20896, was linked to attacks in early July, though it has not been added to the KEV catalog.


Who Should Act Now

  • Any organization self-hosting Gitea between versions 1.17 and 1.27.0, especially instances with open registration enabled
  • Federal agencies, who face an August 28, 2026 patch deadline under Binding Operational Directive 22-01
  • CI/CD and DevOps teams relying on Gitea as internal source control, where a compromised OS user account can pivot into build pipelines and secrets

Mitigation

  1. Upgrade to Gitea 1.27.1 or later immediately — this is the definitive fix for the hook-injection path.
  2. Disable open self-registration (Service.DISABLE_REGISTRATION in app.ini) if public sign-up isn't a business requirement — this removes the lowest-friction path to obtaining write access.
  3. Audit hook directories (<repo>/.git/hooks/) across hosted repositories for unexpected post-index-change or other hook files not deployed by your own tooling.
  4. Review process and network activity on Gitea hosts for unexplained CPU spikes, unfamiliar outbound connections, or unrecognized binaries — hallmarks of the miner payload reported in the wild.
  5. Restrict outbound network access from the Gitea host where feasible, to limit the blast radius of any dropped payload reaching out to a C2 or mining pool.

Sources

  • The Hacker News — Critical Gitea RCE Actively Exploited as Reported Attack Drops Miner-Like Payload
  • GitHub — CVE-2026-60004 Proof of Concept
  • runZero — Gitea vulnerability CVE-2026-60004: find impacted assets
#Vulnerability#CVE#RCE#Gitea#Supply Chain#CISA KEV

Related Articles

Over 8,300 Gitea Servers Still Vulnerable to Active Code Execution Attacks

Shadowserver finds 8,300+ exposed Gitea instances unpatched against CVE-2026-60004, a critical RCE flaw already deploying cryptominers.

3 min read

New Gitea RCE Lets Repository Writers Plant a Git Hook to Run Shell Commands

A critical remote code execution vulnerability in Gitea, tracked as CVE-2026-60004 with a CVSS score of 9.8, allows any user with ordinary repository write access to inject a malicious Git hook and execute arbitrary shell commands as the Gitea service account. All self-hosted installations running Gitea 1.17 through 1.27.0 are affected and should upgrade to 1.27.1 immediately.

8 min read

Hackers Exploit Critical Auth Bypass in Official Gitea Docker Image

Attackers are actively exploiting a critical authentication bypass in the official Gitea Docker image, allowing unauthenticated users to impersonate any...

3 min read
Back to all News