CVE DatabaseCVE-2021-22175
한국어 권고문 →
CVE-2021-221756.8/MEDIUMCISA KEVCWE-918

GitLab Server-Side Request Forgery (SSRF) in Internal Network Webhooks (CVE-2021-22175)

⚡ Jump to Patch
Affected Vendors
gitlab
Affected Components
gitlab
Published Date
2021-06-11
CVSS v3.1
6.8
MEDIUM
EPSS (30d)
53.4%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

All GitLab versions starting from 10.5 where internal network requests for webhooks are enabled

Impact

Unauthenticated attackers can bypass registration restrictions to trigger SSRF, accessing sensitive internal network resources and metadata

Mitigation

Upgrade to the latest patched GitLab version immediately, or disable the 'Allow requests to the local network from web hooks and services' setting

Affected Products & Version Scope

All GitLab Community Edition (CE) and Enterprise Edition (EE) versions starting from 10.5 prior to the patched releases

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Upgrade your GitLab instance to the latest secure release. For Debian/Ubuntu-based systems, execute the following commands:

bash
# Update package repository and upgrade GitLab CE/EE
sudo apt-get update
sudo apt-get install --only-upgrade gitlab-ce

# Reconfigure and restart GitLab services
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart

2. Temporary Workaround & Hardening Configuration

If an immediate upgrade is not feasible, disable local network requests from webhooks in /etc/gitlab/gitlab.rb:

ruby
# Ensure local network requests are disabled for webhooks and services
gitlab_rails['allow_local_requests_from_web_hooks_and_services'] = false

Apply the configuration changes:

bash
sudo gitlab-ctl reconfigure

3. Log Audit & IoC Verification Commands

Verify your current GitLab version and inspect the application logs for potential SSRF exploitation attempts targeting internal IP addresses:

bash
# Check current GitLab version
gitlab-rake gitlab:env:info | grep 'GitLab Version'

# Scan API logs for suspicious requests targeting loopback or metadata endpoints
sudo grep -E '127.0.0.1|169.254|localhost' /var/log/gitlab/gitlab-rails/api_json.log
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Cloudflare Enterprise & Pro WAF
Due to active exploitation in the wild (CISA KEV), immediately apply the official security patch or disable local network webhook requests.

Block Exploits Instantly with Managed Virtual Patching Rules

Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.

3-min setup · Automated Zero-Day Managed Rules
Practice Exploiting & Patching This Web Vulnerability in an Interactive Lab
Launch Hands-On Security Lab

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2021-22175) is a Server-Side Request Forgery (SSRF) in GitLab's webhook functionality. When the configuration allowing webhooks to make requests to the internal network is enabled, GitLab fails to properly validate and restrict destination addresses for unauthenticated requests. The root cause lies in insufficient access control and input validation on specific endpoints, allowing unauthenticated entities to trigger webhooks even when user registration is disabled.

2. Exploitation Mechanics & Attack Scenario

An unauthenticated attacker targets publicly accessible endpoints or exploits registration bypass vectors to trigger webhook events. By crafting malicious payloads containing internal IP addresses (such as loopback 127.0.0.1, private subnets, or cloud metadata endpoints like 169.254.169.254), the attacker forces the GitLab server to perform unauthorized HTTP requests. This allows the attacker to scan internal ports, read local services, or extract cloud instance credentials.

3. Infrastructure & Business Impact

Given its inclusion in the CISA KEV catalog and a high EPSS score, this vulnerability poses a severe threat. Successful exploitation can lead to full compromise of internal infrastructure, exposure of proprietary source code, and lateral movement within the cloud environment. Organizations running self-hosted GitLab instances exposed to the internet are at critical risk.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2021-22175)

FAQ

Q1. How critical is CVE-2021-22175 and is it actively exploited in the wild?

CVE-2021-22175 is rated CVSS 6.8 (MEDIUM) with a 30-day EPSS exploitation probability of 53.4%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2021-22175?

Primary impacted vendors include gitlab across gitlab. Scope summary: All GitLab Community Edition (CE) and Enterprise Edition (EE) versions starting from 10.5 prior to the patched releases

Q3. What temporary mitigations or workarounds exist for CVE-2021-22175 before patching?

[Mitigation] Upgrade to the latest patched GitLab version immediately, or disable the 'Allow requests to the local network from web hooks and services' setting Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2021-22175

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (gitlab)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2021-22175 GitLab Server-Side Request Forgery (SSRF) in Internal Network Webhooks (CVE-2021-22175) (CVSS 6.8) - Patch & Workaround | CVE Pulse