Vulnerability advisory
CVE-2026-25232
Gogs has a Protected Branch Deletion Bypass in Web Interface
Also known as GHSA-2c6v-8r3v-gh6pGO-2026-4498
- CVSS 4.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Affected versions
Repository
| Affected commits | Fixed by commit |
|---|---|
| GIT github.com/gogs/gogs ↗ | |
| All commits before f5c8030c1fd936f3e0e9f774e3c7c39fd102f56f | f5c8030c1fd936f3e0e9f774e3c7c39fd102f56f |
| Not specified | 7b7e38c88007a7c482dbf31efff896185fd9b79c |
Also listed as affected (53)
| |
Description
Gogs is an open source self-hosted Git service. Versions 0.13.4 and below have an access control bypass vulnerability which allows any repository collaborator with Write permissions to delete protected branches (including the default branch) by sending a direct POST request, completely bypassing the branch protection mechanism. This vulnerability in the DeleteBranchPost function eenables privilege escalation from Write to Admin level, allowing low-privilege users to perform dangerous operations that should be restricted to administrators only. Although Git Hook layer correctly prevents protected branch deletion via SSH push, the web interface deletion operation does not trigger Git Hooks, resulting in complete bypass of protection mechanisms. In oder to exploit this vulnerability, attackers must have write permissions to the target repository, protected branches configured to the target repository and access to the Gogs web interface. This issue has been fixed in version 0.14.1.
References
- Webgithub.com/gogs/gogs/releases/tag/v0.14.1 ↗
- Advisorygithub.com/CVEProject/cvelistV5/tree/main/cves/2026/25xxx/CVE-2026-25232.json ↗
- Advisorygithub.com/gogs/gogs/security/advisories/GHSA-2c6v-8r3v-gh6p ↗
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-25232 ↗
- Fixgithub.com/gogs/gogs/commit/7b7e38c88007a7c482dbf31efff896185fd9b79c ↗
- Fixgithub.com/gogs/gogs/pull/8124 ↗