Gogs
Gogs: Path Traversal in organization name results in RCE through Git hooks
Gogs is an open source self-hosted Git service. Prior to 0.14.3, organization names containing path traversal sequences (../) are accepted by Gogs, and repositories under them are written to paths following these path traversals. This allows storing/retrieving data for repositories at arbitrary locations on the filesystem. By creating nested structure of Git repositories, one can overwrite the other's hooks configuration to result in Remote Code Execution (RCE). This vulnerability is fixed in 0.14.3.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 0.14.3
Fixed in 0.14.3
Mitigation
Upgrade gogs to 0.14.3 or later.
References
- Vendor advisory github.com/gogs/gogs/security/advisories/GHSA-…
- Patch github.com/gogs/gogs/pull/8334
- Patch github.com/gogs/gogs/commit/f6acd467305943aae8…
1 more
- Release notes github.com/gogs/gogs/releases/tag/v0.14.3
Timeline
Days relative to CVE publicationFirst public PoC 27 days after publication; not in CISA KEV. First PoC: iqx6889/CVE-2026-52813-Gogs-RCE (created 21 Jul 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| iqx6889/CVE-2026-52813-Gogs-RCE | 21 Jul 2026 +27 d | 1 | PoC |
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 repoGET /admin
- Seen in
- 1 repo: iqx6889/CVE-2026-52813-Gogs-RCE
- Evidence
- iqx6889/CVE-2026-52813-Gogs-RCE/tools/check_version.py:92
GET /user/login
- Seen in
- 1 repo: iqx6889/CVE-2026-52813-Gogs-RCE
- Evidence
- iqx6889/CVE-2026-52813-Gogs-RCE/tools/check_version.py:72
POST /api/v1/user/orgs
- Key headers
Authorization: token {var}- Body markers
"username":"../../../../x"inapplication/json- Seen in
- 1 repo: iqx6889/CVE-2026-52813-Gogs-RCE
- Evidence
- iqx6889/CVE-2026-52813-Gogs-RCE/patch/ANALYSIS.md:95
POST /user/login
- Body markers
_csrf=user_name=password=login_source=0inapplication/x-www-form-urlencoded- Seen in
- 1 repo: iqx6889/CVE-2026-52813-Gogs-RCE
- Evidence
- iqx6889/CVE-2026-52813-Gogs-RCE/tools/check_version.py:77
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/admin(?:[?#].*)?$
(?i)^/user/login(?:[?#].*)?$
(?i)^/api/v1/user/orgs(?:[?#].*)?$
(?i)^/user/login(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-52813 gogs gogs exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/admin"; reference:url,poc.griffinguard.io/cve/CVE-2026-52813; classtype:web-application-attack; sid:9419020; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-52813 gogs gogs exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/user/login"; reference:url,poc.griffinguard.io/cve/CVE-2026-52813; classtype:web-application-attack; sid:9403572; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-52813 gogs gogs exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/v1/user/orgs"; http.header; content:"Authorization: token "; nocase; http.request_body; content:"|22|username|22|:|22|../../../../x|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-52813; classtype:web-application-attack; sid:9858807; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-52813 gogs gogs exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/user/login"; http.request_body; content:"_csrf="; http.request_body; content:"user_name="; http.request_body; content:"password="; http.request_body; content:"login_source=0"; reference:url,poc.griffinguard.io/cve/CVE-2026-52813; classtype:web-application-attack; sid:9678558; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: gogs gogs exploit attempt (CVE-2026-52813)
id: gg-pocmon-cve-2026-52813-9419020
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-52813. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-52813
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/admin'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.52813
title: gogs gogs exploit attempt (CVE-2026-52813)
id: gg-pocmon-cve-2026-52813-9403572
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-52813. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-52813
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/user/login'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.52813
title: gogs gogs exploit attempt (CVE-2026-52813)
id: gg-pocmon-cve-2026-52813-9858807
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-52813. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-52813
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/v1/user/orgs'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.52813
title: gogs gogs exploit attempt (CVE-2026-52813)
id: gg-pocmon-cve-2026-52813-9678558
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-52813. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-52813
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/user/login'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.52813