GitLab’s CI/CD system includes a lint endpoint that validates CI configuration files. The endpoint accepted a content parameter containing YAML that could include include: directives — references to external files to include in the CI configuration.
The SSRF existed because the CI lint API would fetch the URL specified in the include: directive without requiring authentication (the endpoint was publicly accessible) and without validating whether the URL was an internal or external target.
Exploit: An attacker could send a POST request to /api/v4/ci/lint with a YAML body containing include: http://169.254.169.254/latest/meta-data/. GitLab would fetch the metadata endpoint from its EC2/GCP/Azure instance and return the response in the API error message — leaking cloud credentials to the unauthenticated caller.
CVE-2021-22214 was not isolated. GitLab has had multiple SSRF CVEs across its webhook system (outbound webhooks to internal IPs), its “import project from URL” feature, and Prometheus monitoring integrations. Each is the same root cause: a URL-accepting feature that doesn’t validate the destination. GitLab now maintains an allowlist/denylist system for outbound requests, but the history shows how many SSRF vectors a complex API platform can accumulate.