Gogs
Gogs has a Protected Branch Deletion Bypass in Web Interface
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 0.14.1
Fixed in 0.14.1
Mitigation
Upgrade gogs to 0.14.1 or later.
References
- Vendor advisory github.com/gogs/gogs/security/advisories/GHSA-…
- Patch github.com/gogs/gogs/pull/8124
- Patch github.com/gogs/gogs/commit/7b7e38c88007a7c482…
1 more
- Release notes github.com/gogs/gogs/releases/tag/v0.14.1
Timeline
Days relative to CVE publicationFirst public PoC 59 days after publication; not in CISA KEV. First PoC: H1sok444/CVE-2026-25232-PoC (created 18 Apr 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| H1sok444/CVE-2026-25232-PoC | 18 Apr 2026 +59 d | 1 | PoC via PoC Index |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoDELETE /api/v1/repos/admin/important-repo/branches/main
- Ports
- 3001
- Seen in
- 1 repo: H1sok444/CVE-2026-25232-PoC
- Evidence
- H1sok444/CVE-2026-25232-PoC/README.md:57
GET /admin/important-repo
- Key headers
Cookie: cookies.txt- Ports
- 3001
- Seen in
- 1 repo: H1sok444/CVE-2026-25232-PoC
- Evidence
- H1sok444/CVE-2026-25232-PoC/README.md:76
GET /api/v1/repos/admin/important-repo/branches
- Ports
- 3001
- Seen in
- 1 repo: H1sok444/CVE-2026-25232-PoC
- Evidence
- H1sok444/CVE-2026-25232-PoC/README.md:101
POST /admin/important-repo/branches/delete
- Key headers
Cookie: cookies.txt- Body markers
_csrf=name=maininapplication/x-www-form-urlencoded- Ports
- 3001
- Seen in
- 1 repo: H1sok444/CVE-2026-25232-PoC
- Evidence
- H1sok444/CVE-2026-25232-PoC/README.md:88
POST /user/login
- Key headers
Cookie: cookies.txt- Body markers
user_name=attackerpassword=Password123!inapplication/x-www-form-urlencoded- Ports
- 3001
- Seen in
- 1 repo: H1sok444/CVE-2026-25232-PoC
- Evidence
- H1sok444/CVE-2026-25232-PoC/README.md:70
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/v1/repos/admin/important-repo/branches/main(?:[?#].*)?$
(?i)^/admin/important-repo(?:[?#].*)?$
(?i)^/api/v1/repos/admin/important-repo/branches(?:[?#].*)?$
(?i)^/admin/important-repo/branches/delete(?:[?#].*)?$
(?i)^/user/login(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [3001] (msg:"GG PoC-Monitor CVE-2026-25232 gogs gogs exploit attempt"; flow:established,to_server; http.method; content:"DELETE"; http.uri; content:"/api/v1/repos/admin/important-repo/branches/main"; reference:url,poc.griffinguard.io/cve/CVE-2026-25232; classtype:web-application-attack; sid:9040490; rev:1;)
alert http any any -> $HOME_NET [3001] (msg:"GG PoC-Monitor CVE-2026-25232 gogs gogs exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/admin/important-repo"; http.header; content:"Cookie: cookies.txt"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-25232; classtype:web-application-attack; sid:9370277; rev:1;)
alert http any any -> $HOME_NET [3001] (msg:"GG PoC-Monitor CVE-2026-25232 gogs gogs exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/v1/repos/admin/important-repo/branches"; reference:url,poc.griffinguard.io/cve/CVE-2026-25232; classtype:web-application-attack; sid:9644751; rev:1;)
alert http any any -> $HOME_NET [3001] (msg:"GG PoC-Monitor CVE-2026-25232 gogs gogs exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/admin/important-repo/branches/delete"; http.header; content:"Cookie: cookies.txt"; nocase; http.request_body; content:"_csrf="; http.request_body; content:"name=main"; reference:url,poc.griffinguard.io/cve/CVE-2026-25232; classtype:web-application-attack; sid:9858352; rev:1;)
alert http any any -> $HOME_NET [3001] (msg:"GG PoC-Monitor CVE-2026-25232 gogs gogs exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/user/login"; http.header; content:"Cookie: cookies.txt"; nocase; http.request_body; content:"user_name=attacker"; http.request_body; content:"password=Password123!"; reference:url,poc.griffinguard.io/cve/CVE-2026-25232; classtype:web-application-attack; sid:9721253; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: gogs gogs exploit attempt (CVE-2026-25232)
id: gg-pocmon-cve-2026-25232-9040490
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-25232. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-25232
logsource:
category: webserver
detection:
selection:
cs-method: DELETE
cs-uri-stem|contains|all:
- '/api/v1/repos/admin/important-repo/branches/main'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.25232
title: gogs gogs exploit attempt (CVE-2026-25232)
id: gg-pocmon-cve-2026-25232-9370277
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-25232. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-25232
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/admin/important-repo'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.25232
title: gogs gogs exploit attempt (CVE-2026-25232)
id: gg-pocmon-cve-2026-25232-9644751
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-25232. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-25232
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/v1/repos/admin/important-repo/branches'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.25232
title: gogs gogs exploit attempt (CVE-2026-25232)
id: gg-pocmon-cve-2026-25232-9858352
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-25232. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-25232
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/admin/important-repo/branches/delete'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.25232
title: gogs gogs exploit attempt (CVE-2026-25232)
id: gg-pocmon-cve-2026-25232-9721253
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-25232. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-25232
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/user/login'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.25232