Hackers News Hackers News
  • CyberSecurity News
  • Threats
  • Attacks
  • Vulnerabilities
  • Breaches
  • Comparisons

Social Media

Hackers News Hackers News
  • CyberSecurity News
  • Threats
  • Attacks
  • Vulnerabilities
  • Breaches
  • Comparisons
Search the Site
Popular Searches:
technology Amazon AI
Recent Posts
Claude Opus 4.8 Released With Ability to Work as an Experienced
May 28, 2026
AI npm Malware Exposes Threat Actor’s Private GitHub Token
May 28, 2026
VaultJacking Steals Google Password Manager Vault via PIN
May 28, 2026
Home/CyberSecurity News/Gogs 0-Day Vulnerability Allows Remote Lets Attackers
CyberSecurity News

Gogs 0-Day Vulnerability Allows Remote Lets Attackers

Gogs, one of the world’s most widely deployed self-hosted Git platforms, is impacted by a critical zero-day vulnerability that allows any authenticated user to execute arbitrary commands on the...

Emy Elsamnoudy
Emy Elsamnoudy
May 28, 2026 3 Min Read
1 0

Gogs, one of the world’s most widely deployed self-hosted Git platforms, is impacted by a critical zero-day vulnerability that allows any authenticated user to execute arbitrary commands on the underlying server; no patch was available at the time of publication.

Rapid7 Labs researcher Jonah Burgess (CryptoCat) identified the flaw, tracked as a CWE-88 argument injection vulnerability, and scored it CVSSv4 9.4 (Critical).

The vulnerability resides in Gogs’ “Rebase before merging” merge operation and affects the latest stable release, Gogs 0.14.2, as well as the development build 0.15.0+dev (commit b53d3162). All prior versions supporting the rebase merge style are also likely vulnerable.

Gogs 0-Day Vulnerability

The exploit targets the Merge() function in internal/database/pull.go, which passes pull request base branch names directly to a git rebase command without a POSIX -- separator or proper argument sanitization. An attacker crafts a malicious branch name such as --exec=touch${IFS}/tmp/rce_proof and opens a pull request using that branch.

When the rebase merge is triggered, Git’s argument parser interprets --exec as a flag rather than a branch name, causing Git to run the attacker-controlled command via sh -c after each replayed commit.

The result is arbitrary command execution running as the Gogs server process user — typically git on both Docker and binary installations.

What makes this especially dangerous is the low barrier to entry. Gogs ships with open user registration and unlimited repository creation enabled by default.

This means an unauthenticated attacker can register an account, create a repository, enable rebase merging in settings, and launch the full exploit chain entirely within their own account, requiring no interaction from any other user and no administrative privileges, Jonah Burgess said.

The practical consequences of a successful exploit are severe:

  • Server compromise via arbitrary command execution as the Gogs process user
  • Cross-tenant data breach — read every repository on the instance, including private repos from other users
  • Credential theft — dump password hashes, API tokens, SSH keys, and 2FA secrets from the database
  • Lateral movement to other systems reachable from the server’s network
  • Supply chain attacks — silently modify any hosted repository’s code, bypassing audit logging

Gogs has approximately 50,000 GitHub stars and over 5,000 forks, and a Shodan search at the time of publication revealed 1,141 internet-facing instances with the real install base far larger due to internal and VPN-protected deployments.

A fully functional Metasploit module has been published, making exploitation trivial and automatable in seconds.

Defenders should monitor Gogs server logs for ERROR-level entries containing patterns like git checkout '--exec=<...>': exit status 128.

Administrators should also audit repository branch listings for names beginning with --, check user token lists at /-/user/settings/applications for unexpected msf_<hex> entries, and inspect PR histories on sensitive repositories.

Mitigations

No vendor patch exists. Until one is released, organizations should apply these mitigations immediately:

  • Set DISABLE_REGISTRATION = true in app.ini to block untrusted account creation
  • Set MAX_CREATION_LIMIT = 0 to prevent users from creating new repositories
  • Audit all repositories for the “Rebase before merging” setting, especially on repos with external contributors

Rapid7 first reported this vulnerability to Gogs maintainers on March 17, 2026. Despite multiple follow-ups through May 2026, no fix has been delivered.

Disclaimer: HackersRadar reports on cybersecurity threats and incidents for informational and awareness purposes only. We do not engage in hacking activities, data exfiltration, or the hosting or distribution of stolen or leaked information. All content is based on publicly available sources.

Tags:

AttackBreachExploitPatchVulnerabilityzero-day

Share Article

Emy Elsamnoudy

Emy Elsamnoudy

Emy is a cybersecurity analyst and reporter specializing in threat hunting, defense strategies, and industry trends. With expertise in proactive security measures, Emily covers the tools and techniques organizations use to detect and prevent cyber attacks. She is a regular speaker at security conferences and has contributed to industry reports on threat intelligence and security operations. Emily's reporting focuses on helping organizations improve their security posture through practical, actionable insights.

Previous Post

Critical OpenVPN macOS Flaw Allows Arbitrary Command Execution

Next Post

VaultJacking Steals Google Password Manager Vault via PIN

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular Posts
Malicious Sites Track Visitors via SSD Timing Analysis
May 28, 2026
Critical Linux CIFSwitch Kernel Flaw Grants Root Vulnerability Allows
May 28, 2026
ClearFake Uses BSC Testnet Contracts for Takedown-
May 28, 2026
Top Authors
Marcus Rodriguez
Marcus Rodriguez
Jennifer sherman
Jennifer sherman
Emy Elsamnoudy
Emy Elsamnoudy
Let's Connect
156k
2.25m
285k

Related Posts

Jennifer sherman
By Jennifer sherman
Threats

GlassWorm Attacks macOS via Malicious VS Code…

January 1, 2026
Emy Elsamnoudy
By Emy Elsamnoudy
Attacks

ClickFix Attack Hides Malicious Code via Stegan Security

January 1, 2026
Sarah simpson
By Sarah simpson
Vulnerabilities

MongoBleed Detector Tool Detects Critical MongoDB CVE-

January 1, 2026
Emy Elsamnoudy
By Emy Elsamnoudy
Breaches

Conti Ransomware Gang Leaders & Infrastructure Exposed

January 1, 2026
Hackers News Hackers News
  • [email protected]

Quick Links

  • Contact Us
  • Privacy Policy
  • Terms of service

Categories

Attacks
Breaches
Comparisons
CyberSecurity News
Threats
Vulnerabilities

Let's keep in touch

receive fresh updates and breaking cyber news every day and week!

All Rights Reserved by HackersRadar ©2026

Follow Us