Skip to main content

Gogs CVE-2026-52796

| EUVDEUVD-2026-39065 LOW
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2026-06-22 https://github.com/gogs/gogs GHSA-4j89-2c4f-44c6
3.5
CVSS 3.1 · Vendor: https://github.com/gogs/gogs

Severity by source

Vendor (https://github.com/gogs/gogs) PRIMARY
3.5 LOW
AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L
vuln.today AI
3.5 LOW

Network-attack vector, low privilege required, user interaction needed, availability impact only.

3.1 AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:L/UI:R/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/gogs/gogs).

CVSS VectorVendor: https://github.com/gogs/gogs

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

2
Source Code Evidence Fetched
Jun 23, 2026 - 00:13 vuln.today
Analysis Generated
Jun 23, 2026 - 00:13 vuln.today

DescriptionCVE.org

Summary

Special template of issue index pattern may cause panic.

Details

in internal/markup/markup.go

go
link = fmt.Sprintf(`<a href="%s">%s</a>`, com.Expand(metas["format"], metas), m)

Issue index pattern is rendered to link with com.Expand.

However, com.Expand is not safe.

go
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

  1. set issue index pattern as follow

!image

  1. 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.

AnalysisAI

Denial of service in Gogs (self-hosted Git service) allows low-privileged authenticated users to crash the issue rendering pipeline on any repository page containing an issue reference. By setting a malformed external issue tracker URL format with an unclosed '{', the template expansion function panics, making the affected repository's pages unavailable to all viewers. A proof-of-concept is available but no active exploitation has been reported (EPSS 0.28%).

Technical ContextAI

The vulnerability stems from the use of the com.Expand function in Gogs' markup rendering at internal/markup/markup.go. This function attempts to replace template placeholders like {key} with values from a metas map. When the template string (the issue index pattern) contains a { without a matching }, strings.Index returns a small index, and slicing the string from 0 to that index causes an out-of-bounds panic (slice bounds out of range). The CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine) describes the root cause. The affected product is Gogs, a Go-based Git hosting platform (CPE: pkg:go/gogs.io_gogs), and versions prior to 0.14.3 are vulnerable.

RemediationAI

Upgrade Gogs to version 0.14.3 or later, which replaces the unsafe com.Expand with a safe expand function using strings.NewReplacer. The fix is available as a tagged release at https://github.com/gogs/gogs/releases/tag/v0.14.3. No workarounds are documented; however, as a compensating control, administrators can restrict the ability to modify repository issue index patterns to only trusted users, or disable external issue tracker integration if not needed. Note that these workarounds may limit functionality and require manual verification of repository settings.

More in Ssti

View all
CVE-2024-23692 CRITICAL POC
9.8 May 31

Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. Rated c

CVE-2025-47916 CRITICAL POC
10.0 May 16

Invision Community 5.0.0 through 5.0.6 contains an unauthenticated remote code execution vulnerability in the template e

CVE-2024-6386 CRITICAL POC
9.9 Aug 21

Remote code execution in the WPML WordPress multilingual plugin (versions up to and including 4.6.12) allows Contributor

CVE-2026-75650 CRITICAL POC
10.0 Sep 07

Server-side template injection in Adobe Commerce, Adobe Commerce B2B, and Magento Open Source allows remote unauthentica

CVE-2025-23211 CRITICAL POC
9.9 Jan 28

Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve

CVE-2024-32651 CRITICAL POC
10.0 Apr 26

changedetection.io is an open source web page change detection, website watcher, restock monitor and notification servic

CVE-2024-4040 CRITICAL POC
10.0 Apr 22

A server side template injection vulnerability in CrushFTP in all versions before 10.7.1 and 11.1.0 on all platforms all

CVE-2026-15734 CRITICAL POC
9.8 Aug 06

Remote code execution in WGDashboard 4.3.2 and earlier lets authenticated attackers inject Server-Side Template Injectio

CVE-2024-24724 CRITICAL POC
9.8 Apr 03

Gibbon through 26.0.00 allows /modules/School%20Admin/messengerSettings.php Server Side Template Injection leading to Re

CVE-2026-77136 CRITICAL POC
9.5 Aug 25

Server-side template injection in the TYPO3 'Powermail' extension lets an anonymous user submit Fluid template syntax th

CVE-2026-72716 CRITICAL POC
9.3 Aug 19

Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 or Swagger v2 specification execute arbitra

CVE-2026-28496 CRITICAL POC
9.4 Jun 23

Server-side template injection in FOSSBilling versions prior to 0.8.0 allows authenticated administrators to execute arb

Share

CVE-2026-52796 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy