Register for the AI for Security Summit: Join Figma, Perplexity & Wiz

CVE-2020-13295
GitLab Runner vulnerability analysis and mitigation

Overview

GitLab Runner versions before 13.0.12, 13.1.6, and 13.2.3 contained a Server-Side Request Forgery (SSRF) vulnerability. The vulnerability was discovered and disclosed in August 2020, affecting all previous versions of GitLab Runner. The issue allowed an attacker to perform SSRF attacks by replacing the Docker daemon with a malicious server in the Shared Runner environment (GitLab Release, NVD).

Technical details

The vulnerability stems from a bug in the Docker client implementation within Shared Runners that allowed following HTTP redirections. The Docker daemon running in executors, which are under user control, could be replaced with a malicious HTTPS server that sends redirect responses. TLS validation could not prevent this attack since both public and private keys used by the Docker daemon in the executor were under the CI job's control. The vulnerability received a CVSS v3.1 base score of 8.8 (HIGH) from NVD and 5.4 (MEDIUM) from GitLab Inc (NVD).

Impact

The vulnerability allowed attackers to perform blind SSRF attacks targeting the Shared Runner's localhost, link-local, and local networks. In error cases, the response body would be displayed in CI job logs. Successful HTTP requests could reveal the first character of the response or cause process hanging if the response was valid JSON. The attack could potentially be used to access sensitive metadata services and perform resource exhaustion attacks (GitLab Release).

Exploitability

The vulnerability could be exploited by obtaining a reverse shell into the Executor, gaining root access to the Executor, mounting the host file system, and setting up a malicious HTTPS server. The attacker could then redirect the Runner's Docker Client's requests to target internal services. The exploit required multiple steps but could be automated (GitLab Release).

Mitigation and workarounds

The vulnerability was patched in GitLab Runner versions 13.0.12, 13.1.6, and 13.2.3. Organizations were strongly recommended to upgrade their GitLab Runner installations to these versions immediately. The fix prevented the Runner's Docker client from trusting the Docker daemon and following redirections from the Docker REST API, particularly to local addresses (GitLab Release).

Community reactions

The vulnerability was responsibly reported by security researcher @lucash-dev through the HackerOne platform. GitLab addressed the issue promptly and included it in their scheduled security release along with several other security fixes (GitLab Release).

Additional resources


SourceThis report was generated using AI

Related GitLab Runner vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2024-24790CRITICAL9.8
  • Go logoGo
  • tkn
NoYesJun 05, 2024
CVE-2024-24791HIGH7.5
  • Go logoGo
  • ose-gcp-pd-csi-driver-operator-container-v4.14.0
NoYesJul 02, 2024
CVE-2024-6104MEDIUM5.5
  • Terraform Community logoTerraform Community
  • messaging-topology-operator-1.14
NoYesJun 24, 2024
CVE-2024-35255MEDIUM5.5
  • JavaScript logoJavaScript
  • azure-cli-core
NoYesJun 11, 2024
CVE-2024-24789MEDIUM5.5
  • Go logoGo
  • harbor-scanner-trivy
NoYesJun 05, 2024

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management