نسخههای متأثر
بازهها نیاز به بررسی دارند.
- نسخههای متأثر
- <= 0.14.2
- نسخهٔ اصلاحشده
- 0.14.3
- نسخههای متأثر
- *
- نسخهٔ اصلاحشده
- اعلام نشده
بهرهبرداری
شرح آسیبپذیری
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
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.
پیوندها
- https://github.com/advisories/GHSA-4j89-2c4f-44c6
- https://github.com/gogs/gogs
- https://github.com/gogs/gogs/commit/0529d95fc39f2b6d2997b19a2a12e24522684722
- https://github.com/gogs/gogs/pull/8312
- https://github.com/gogs/gogs/releases/tag/v0.14.3
- https://github.com/gogs/gogs/security/advisories/GHSA-4j89-2c4f-44c6
- https://nvd.nist.gov/vuln/detail/CVE-2026-52796
گزارشدهندگان
- BaiMeow

