一、 漏洞 CVE-2018-18925 基础信息
漏洞信息
                                        # N/A

## 漏洞概述
Gogs 0.11.66 版本中存在远程代码执行漏洞,原因是该版本没有正确验证 session IDs,导致可以通过伪造的 ".." session 文件在文件提供者 file.go 中执行恶意代码。

## 影响版本
- Gogs 0.11.66

## 漏洞细节
该漏洞源于 session ID 的处理不当,具体发生在 `go-macaron/session` 代码中,针对 Macaron 框架。攻击者可以通过伪造含有 ".." 的 session 文件,利用文件提供者 (file provider) 中的漏洞执行远程代码。

## 影响
攻击者可以利用该漏洞执行任意代码,可能导致服务器完全被控制,具有高风险。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
N/A
来源:美国国家漏洞数据库 NVD
漏洞描述信息
Gogs 0.11.66 allows remote code execution because it does not properly validate session IDs, as demonstrated by a ".." session-file forgery in the file session provider in file.go. This is related to session ID handling in the go-macaron/session code for Macaron.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
N/A
来源:美国国家漏洞数据库 NVD
漏洞标题
Gogs 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Gogs(又名Go Git Service)是Gogs团队开发的一个基于Go语言的自助Git托管服务,它支持创建、迁移公开/私有仓库,添加、删除仓库协作者等。 Gogs 0.11.66版本中存在安全漏洞,该漏洞源于程序没有正确验证会话ID。远程攻击者可利用该漏洞执行代码。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
授权问题
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2018-18925 的公开POC
# POC 描述 源链接 神龙链接
1 Exploitation of CVE-2018-18925 a Remote Code Execution against the Git self hosted tool: Gogs. https://github.com/j4k0m/CVE-2018-18925 POC详情
2 Gogs 0.11.66 allows remote code execution because it does not properly validate session IDs, as demonstrated by a ".." session-file forgery in the file session provider in file.go. This is related to session ID handling in the go-macaron/session code for Macaron. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2018/CVE-2018-18925.yaml POC详情
3 None https://github.com/Threekiii/Awesome-POC/blob/master/Web%E5%BA%94%E7%94%A8%E6%BC%8F%E6%B4%9E/Gogs%20%E4%BB%BB%E6%84%8F%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95%E6%BC%8F%E6%B4%9E%20CVE-2018-18925.md POC详情
4 https://github.com/vulhub/vulhub/blob/master/gogs/CVE-2018-18925/README.md POC详情
三、漏洞 CVE-2018-18925 的情报信息