Gogs Zero-Day Chaos: Hundreds of Git Servers Hijacked Through Silent RCE Flaw

Listen to this Post

Featured Image

Introduction

A silent and deeply technical security disaster is unfolding in the world of self-hosted development platforms. Gogs, a lightweight Git service used by thousands of organizations, has become the center of a widespread exploitation campaign. A newly revealed zero-day vulnerability has allowed attackers to break into Internet-exposed servers, overwrite critical system files, and execute arbitrary commands with shocking ease. What began as a routine malware investigation has now uncovered a global breach affecting hundreds of systems.

Main Summary (Approx. )

The Hidden Weakness in a Trusted Tool

Gogs has long been praised as a minimalist alternative to GitLab and GitHub Enterprise. Built with Go and commonly deployed on public-facing infrastructure, its simplicity has also become its greatest weakness. The new vulnerability, tracked as CVE-2025-8110, exposes a path traversal issue inside the PutContents API, which attackers can abuse to escape directory restrictions and overwrite arbitrary files on the host system.

Old Bug, New Attack Vector

Previously, Gogs patched a similar remote code execution bug labeled CVE-2024-55947. Developers implemented path validation to block traversal attempts, but missed one critical detail: symbolic link destinations were never validated. This oversight allowed attackers to create repositories embedded with symlinks pointing to sensitive system locations, then write through those links using the same API, effectively bypassing protections and restoring full RCE capabilities.

Overwriting SSH Configuration for Full Control

The attack reaches its climax when adversaries overwrite Git configuration files, particularly the sshCommand parameter. By manipulating this setting, attackers can force Git operations to execute malicious commands as if they were legitimate system actions. The result is complete takeover of the server with minimal detection opportunities.

Evidence of a Widespread Attack Campaign

Wiz Research uncovered this vulnerability in July during an investigation into a compromised Gogs instance. Their research revealed more than 1,400 Gogs servers exposed online and confirmed that over 700 had already been breached. What made the discovery even more alarming was the uniformity: all compromised servers contained mysterious repositories with random eight-character names created within the same period, indicating the work of a single automated attack system.

Open Registration, an Open Door

An unsettling detail emerged during scanning: many Gogs installations had “Open Registration” enabled by default. Attackers could easily create new accounts, upload malicious repositories, and deploy exploits without resistance. This configuration multiplied the attack surface dramatically and helped fuel the scale of the campaign.

Malware Powered by Supershell

The deployed malware was created using Supershell, an open-source C2 framework known for establishing reverse SSH shells through web services. Investigators tracked the communication to a command-and-control server at 119.45.176[.]196, further tying the campaign together.

Slow Patch, Fast Exploitation

Wiz Research reported the issue to Gogs maintainers on July 17. It was acknowledged months later on October 30 while a patch was still in development. A second wave of attacks arrived almost immediately on November 1, signaling that attackers were tracking the disclosure timeline closely.

Urgent Mitigation Steps for Users

Administrators are advised to disable open registration immediately, restrict access through VPN or IP allow-listing, and audit their instances for abnormal use of the PutContents API. Repositories with random eight-character names are major red flags of compromise.

What Undercode Say:

A Deep Analytical Breakdown (Approx. 40 Lines)

The Anatomy of the Exploit Chain

The Gogs zero-day is a textbook example of how seemingly small validation gaps evolve into large-scale exploitation events. The flaw did not exist in isolation, it lived in the shadow of a previously patched vulnerability. Because the original patch focused strictly on sanitizing paths, attackers pivoted to symlink manipulation, one of the oldest and most effective tricks in filesystem exploitation.

The SymLink Blind Spot

Symbolic links often sit at the crossroads between convenience and danger. Modern software must validate not only the path, but the destination the link resolves to. Gogs validated the former while entirely ignoring the latter. This imbalance created a perfect opportunity for attackers to overwrite high-value targets like SSH configurations without touching directory boundaries.

Why Developers Miss These Bugs

Path traversal vulnerabilities are notoriously difficult to eliminate because they require thinking in terms of both file system logic and user-controlled content. Software that handles repositories, archives, or uploads is especially at risk because attackers can craft complex link structures that appear harmless until combined with API operations like PutContents.

Open Registration Magnified the Impact

Leaving Gogs instances open to public user creation was a fatal multiplier. Instead of needing credentials or pre-existing access, attackers could simply walk through the front door. They registered accounts, built malicious repositories, and executed the exploit at scale. A vulnerability becomes exponentially more dangerous when the entry vector is free, instant, and anonymous.

Automated Campaigns and Uniform Fingerprints

The identical repository patterns across hundreds of compromised servers reveal automation. This is no small-time opportunistic attack. The actors behind this campaign deployed tooling that scanned the internet, created accounts, uploaded malicious repositories, triggered the exploit, deployed Supershell, and moved on. It demonstrates discipline, planning, and resource availability.

The Use of Supershell

Supershell being the payload is significant. It is a modern, flexible C2 system that uses reverse SSH tunnels. This choice suggests attackers wanted persistence, stealth, and compatibility with minimal infrastructure. Supershell operates quietly and blends well into environments where SSH activity is normal.

A Patch Timeline That Invited Attack

The patch delay created a dangerous gap. Once the maintainers acknowledged the bug publicly, adversaries likely intensified activity, anticipating that the fix was still underway. This pattern aligns with the second attack wave seen on November 1. Public acknowledgment without immediate remediation often fuels exploitation trends.

A Failure of Default Security

The default Gogs configuration prioritizes ease of use over safety. Open registration, direct exposure to the internet, and limited access controls create fertile ground for systemic compromise. Administrators often accept defaults without understanding their consequences, and attackers exploit this complacency.

Credential-Less Attacks Raise Serious Alarms

Because the attack chain required no existing access, it became one of the most scalable RCE threats in self-hosted Git ecosystems this year. The ability to write arbitrary data to arbitrary files is equivalent to root compromise under the right conditions.

Broader Implications for Self-Hosted Git Services

This event highlights the fragile nature of self-hosted DevOps infrastructure. As companies increasingly shift to internal Git platforms, vulnerabilities in these systems have the potential to halt development pipelines, leak proprietary code, or deliver software supply chain attacks downstream.

The Supply Chain Risk Nobody Mentions

A compromised Git service does not simply give attackers shell access. It can poison repositories, alter CI/CD configurations, inject malicious code, or manipulate deployment keys. This makes the Gogs zero-day not just a server compromise but a potential supply-chain infiltration vector with long-term consequences.

The Need for Hardening and Zero-Trust Principles

Organizations must rethink how they expose developer tools. Git platforms are high-value assets and should never be directly accessible without proper gating. VPN enforcement, multi-factor restrictions, and strict repository access audits should be standard.

🔍 Fact Checker Results

CVE-2025-8110 is confirmed as a path traversal flaw enabling remote code execution. ✅

Over 700 compromised Gogs servers were verified during investigation. ✅

Exploitation occurred before a complete patch was released. ❌ (Patch was still under development at time of attacks)

📊 Prediction

The exploitation of Gogs servers will likely inspire copycat attacks targeting other self-hosted Git platforms. 🔥
More automated campaigns using Supershell-style C2 frameworks are expected to surface over the next year. 🤖
Administrators who fail to disable open registration or restrict external access may see recurrent compromise attempts. ⚠️

🕵️‍📝✔️Let’s dive deep and fact‑check.

References:

Reported By: www.bleepingcomputer.com
Extra Source Hub (Possible Sources for article):
https://stackoverflow.com
Wikipedia
OpenAi & Undercode AI

Image Source:

Unsplash
Undercode AI DI v2
Bing

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow UndercodeNews & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin | 🦋BlueSky | 🐘Mastodon