Slide 13 of 28
Part 2 · How It WorksSlide 13
Slide 13 · Real Incident
GitLab — SSRF via webhooks and CI lint API.
CVE-2021-22214 — unauthenticated SSRF allowing internal network access through a public API endpoint.
📄 CVE-2021-22214 · GitLab Security · 2021
THE VULNERABILITY
GitLab CI Lint API — CVE-2021-22214

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.

Why this is a direct API7 example: This is exactly the OWASP API7 pattern. A legitimate API feature (CI configuration validation with remote file includes) becomes an SSRF vector because the URL parameter is accepted without host validation. The API was public-facing, required no authentication, and fetched arbitrary URLs server-side — ideal for cloud metadata exploitation on any GitLab instance running on a major cloud provider.
GitLab’s broader SSRF history

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.

← Back Attack Scenarios →