Cyber: Critical Gogs RCE Vulnerability Lets Any Authenticated User Ex... (2026)
A critical security vulnerability has been disclosed in Gogs, a popular open-source self-hosted Git service, that allows an authenticated user to execute arbitrary code under certain conditions. The security flaw, per Rapid7, is rated 9.4 on the CVSS scoring system. It does not have a CVE identifier. "The vulnerability allows any authenticated user to achieve remote code execution (RCE) on the server by creating a pull request with a malicious branch name that injects the --exec flag into git rebase during the 'Rebase before merging' merge operation," security researcher Jonah Burgess said. Rebasing is a Git action that's used to take a sequence of commits from one feature branch and replay them on top of another base branch to create a linear project history. While "git rebase" solves the same problem as "git merge" -- i.e., integrating changes from one branch into another -- the former rewrites the project history by creating new commits for each commit in the original branch. The "git rebase" action also accepts as an argument a shell command via an --exec flag that's executed after each commit is replayed. A notable aspect of the vulnerability is that it does not require admin privileges or interaction with other users. To pull off the attack, all an unauthenticated threat actor has to do is create an account and repository on any default-configured instance. "Any registered user who creates a repo is automatically its owner," Burgess said. "From there, enabling rebase merging is a single toggle in settings, and the entire exploit chain can be operated without interaction from any other user." In an alternative scenario, a user with write access to a repository where rebase is already enabled can exploit the flaw directly to obtain code execution. On Gogs instances where repository creation is restricted, an attacker is required to have write access to any repository that has rebase merging enabled. As of writing, the vulnerability remains unpatched despite it being reported to the maintainer on March 17, 2026. Successful exploitation of the bug could grant an attacker the ability to breach the server, access every repository on the instance, dump credentials, move to other network-accessible systems, and tamper with any hosted repository's code. What's more, it can result in a cross-tenant data breach, allowing the attacker to read other users' private repositories hosted on the same shared server. According to Rapid7, the flaw impacts all sup
Source: The Hacker News