CVE-2021-39935 Sumo Logic CSE · Sumo

Detect GitLab SSRF via Import Feature (CVE-2021-39935) in Sumo Logic CSE

CVE-2021-39935 is a Server-Side Request Forgery (SSRF) vulnerability in GitLab Community and Enterprise Editions. An attacker can abuse GitLab's project import or integration features to cause the server to issue arbitrary HTTP requests to internal network resources, enabling reconnaissance, metadata service access, and potential lateral movement within cloud-hosted or on-premises GitLab deployments. This vulnerability is listed in the CISA Known Exploited Vulnerabilities catalog.

MITRE ATT&CK

Tactic
Reconnaissance Discovery Lateral Movement

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
_sourceCategory=web/access OR _sourceCategory=nginx/access OR _sourceCategory=iis/access
| parse regex "(?P<src_ip>\d+\.\d+\.\d+\.\d+)" nodrop
| where _raw matches /(\/api\/v4\/projects|\/import|\/integrations)/
| where _raw matches /(169\.254\.169\.254|metadata\.google\.internal|100\.100\.100\.200|127\.0\.0\.1|localhost)/
| parse regex "(?P<status_code>\d{3})" nodrop
| count by src_ip, status_code
| sort by _count desc
high severity medium confidence

Sumo Logic query identifying SSRF attempts via GitLab API endpoints that reference cloud metadata or loopback addresses.

Data Sources

Web access logsNginx access logsIIS logs

Required Tables

web/accessnginx/accessiis/access

False Positives & Tuning

  • Automated health checks from internal monitoring systems hitting GitLab API
  • GitLab service workers making loopback calls for internal caching
  • Security tools probing GitLab for misconfiguration detection

Other platforms for CVE-2021-39935


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1SSRF via GitLab Project Import URL — Cloud Metadata

    Expected signal: Outbound network connection from GitLab server process to 169.254.169.254:80; HTTP GET request logged in GitLab production.log with import_url parameter containing metadata IP

  2. Test 2SSRF via GitLab Webhook Integration — Internal Host

    Expected signal: Network connection attempt from GitLab process to 192.168.1.1:6379; webhook creation logged in GitLab audit log with attacker-supplied internal URL

  3. Test 3SSRF via GitLab External Issue Tracker Integration — GCP Metadata

    Expected signal: DNS lookup for metadata.google.internal followed by HTTP GET from GitLab server; integration update recorded in GitLab application log

Unlock Pro Content

Get the full detection package for CVE-2021-39935 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections