GHSA-4j89-2c4f-44c6

Suggest an improvement
Source
https://github.com/advisories/GHSA-4j89-2c4f-44c6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-4j89-2c4f-44c6/GHSA-4j89-2c4f-44c6.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-4j89-2c4f-44c6
Aliases
  • CVE-2026-52796
Published
2026-06-22T23:58:17Z
Modified
2026-06-23T00:15:07.128594046Z
Severity
  • 3.5 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L CVSS Calculator
Summary
Gogs has DoS in rendering issue index pattern
Details

Summary

Special template of issue index pattern may cause panic.

Details

in internal/markup/markup.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.

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.

Database specific
{
    "severity": "LOW",
    "cwe_ids": [
        "CWE-1336"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-06-22T23:58:17Z",
    "nvd_published_at": null
}
References

Affected packages

Go / gogs.io/gogs

Package

Name
gogs.io/gogs
View open source insights on deps.dev
Purl
pkg:golang/gogs.io/gogs

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.14.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-4j89-2c4f-44c6/GHSA-4j89-2c4f-44c6.json"
last_known_affected_version_range
"<= 0.14.2"