安全速报自动同步 · 保留上游原文
【低危】gogs:拒绝服务风险(GHSA-4j89-2c4f-44c6)
安全情报快照 · 风险级别:低危 · CVSS:3.5 · CVE-2026-52796 · GHSA-4j89-2c4f-44c6
先看结论
gogs存在拒绝服务风险,<= 0.14.2 受影响,建议升级至 0.14.3。
影响范围
| 生态 | 组件 | 受影响版本 | 首个修复版本 |
|---|---|---|---|
| go | gogs.io/gogs |
<= 0.14.2 | 0.14.3 |
处置建议
优先将 gogs.io/gogs 升级至 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

finally, all pages than contains issue index are unavailable.
PoC
- set issue index pattern as follow

- add a commit which point to an issue in its msg

using #1 above
Impact
DoS that cause part of pages of the specify repo unavailable.
来源与许可
- GitHub Advisory GHSA-4j89-2c4f-44c6
- 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
本页自动同步 GitHub Advisory Database 的公开数据,并保留上游原文供核验;不宣称原创分析。数据许可:CC-BY-4.0。
来源说明:本页自动同步 GitHub Advisory Database 的公开安全数据,并保留上游原文供核验,不宣称原创分析。请以 原始公告为准。
评论
登录 后参与讨论。
还没有评论,来说两句。