漏洞类型 | 对外部实体的文件或目录可访问 | 发现时间 | 2025-06-24 | 漏洞等级 | 严重 |
MPS编号 | MPS-hiea-l3kn | CVE编号 | CVE-2024-56731 | 漏洞影响广度 |
漏洞危害
OSCS 描述 |
Gogs是一款Go语言开发的开源托管Git服务/代码仓库。 在0.13.3版本之前,由于CVE-2024-39931的补丁未考虑删除文件时的符号链接场景,具有代码仓库普通用户权限的攻击者可通过符号链接绕过限制删除.git目录下HEAD等文件。 由于git的默认查找机制,仓库在删除.git/HEAD后,git会在上层目录中查找,当config中包含恶意系统命令,攻击者可实现远程命令执行,窃取其他用户仓库代码。 参考链接:https://www.oscs1024.com/hd/MPS-hiea-l3kn |
影响范围及处置方案
OSCS 平台影响范围和处置方案
影响范围 | 处置方式 | 处置方法 |
gogs.io/gogs (-∞, 0.13.3) | 升级 | 将组件 gogs.io/gogs 升级至 0.13.3 及以上版本 |
参考链接:https://www.oscs1024.com/hd/MPS-hiea-l3kn |
排查方式
方式1:使用漏洞检测CLI工具来排查使用文档:https://www.murphysec.com/docs/faqs/integration/cli.html |
方式2:使用漏洞检测IDEA插件排查使用文档:https://www.murphysec.com/docs/faqs/integration/jetbrains-ide-plugin.html |
方式3:接入GitLab进行漏洞检测排查使用文档:https://www.murphysec.com/docs/faqs/integration/gitlab.html |
更多排查方式:https://www.murphysec.com/docs/faqs/integration/ |
本文参考链接
https://www.oscs1024.com/hd/MPS-hiea-l3kn
https://nvd.nist.gov/vuln/detail/CVE-2024-56731
https://github.com/gogs/gogs/commit/77a4a945ae9a87f77e392e9066b560edb71b5de9
https://github.com/gogs/gogs/security/advisories/GHSA-wj44-9vcg-wjq7
https://www.sonarsource.com/blog/securing-developer-tools-unpatched-code-vulnerabilities-in-gogs-2/