PT-2026-51456 · Go · Gogs.Io/Gogs

Publicado

2026-06-22

·

Atualizado

2026-06-22

·

CVE-2026-52796

CVSS v3.1

3.5

Baixa

VetorAV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L

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.

Correção

Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾

Enumeração de Fraquezas

Identificadores relacionados

CVE-2026-52796
GHSA-4J89-2C4F-44C6

Produtos afetados

Gogs.Io/Gogs