CVE-2026-52796: Gogs has DoS in rendering issue index pattern
Summary Special template of issue index pattern may cause panic. Details in internal/markup/markup.go Issue index pattern is rendered to link with com.Expand. However, com.Expand is not safe. when { is found but } not found, i comes to 1, template[:-1] will be called, and then panicked finally, all pages than contains issue index are unavailable. PoC 1. set issue index pattern as follow 2.
Published Jun 22, 2026 · Updated Jul 21, 2026
Affected packages
gogs.io/gogs
- Ecosystem
- Go
- Affected
- <= 0.14.2
- Fixed in
- 0.14.3
- Check
go list -m gogs.io/gogs
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Special template of issue index pattern may cause panic.
Details
in internal/markup/markup.go
link = fmt.Sprintf(`%s`, com.Expand(metas["format"], metas), m)Issue index pattern is rendered to link with com.Expand.
However, com.Expand is not safe.
i = strings.Index(template, "}")
if s, ok := match[template[:i]]; ok {when { is found but } not found, i comes to 1, template[:-1] will be called, and then panicked
image
finally, all pages than contains issue index are unavailable.
PoC
- set issue index pattern as follow
image
- add a commit which point to an issue in its msg
image
using #1 above
Impact
DoS that cause part of pages of the specify repo unavailable.
Credited to BaiMeow.
References
- https://github.com/gogs/gogs/security/advisories/GHSA-4j89-2c4f-44c6
- https://github.com/gogs/gogs/pull/8312
- https://github.com/gogs/gogs/commit/0529d95fc39f2b6d2997b19a2a12e24522684722
- https://github.com/gogs/gogs/releases/tag/v0.14.3
- https://nvd.nist.gov/vuln/detail/CVE-2026-52796
- https://github.com/advisories/GHSA-4j89-2c4f-44c6
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-52800
Gogs Vulnerable to CSRF Leading to Organization Owner Takeover
high8.8Jun 23, 2026CVE-2026-52801
Gogs has the ability to import local repositories via Mirror Settings
high8.1Jun 23, 2026CVE-2026-52802
Gogs has an Open Redirect via redirect_to
medium5.4Jun 23, 2026CVE-2026-52804
Gogs Vulnerable to Privilege Escalation via Collaboration Access Mode Validation
medium5.5Jun 23, 2026CVE-2026-52805
Gogs has a Migration Redirect Bypass that Leads to Internal Repository Theft
high8.7Jun 23, 2026CVE-2026-52806
Gogs vulnerable to RCE via git rebase --exec argument injection in pull request merge
critical9.9Jun 23, 2026
