Skip to content
SSRF Disclosed report Intermediate

bypass the SSRF check when Run CI/CD pipelines for external repositories in gitlab.com

The CI/CD pipeline feature for external repositories had an incomplete SSRF check that did not block private network ranges such as 10.*.*.*, unlike the webhook check. An attacker could use this to send requests to internal servers and potentially achieve remote code execution.

GitLab

Originally disclosed on GitLab

  • Fixed in 52 days
  • Disclosed after 52 days

HackerOne report #441182 by math1as on 2018-11-15:

Summary: the SSRF check in gitlab.com online server could be bypassed when Run CI/CD pipelines for external repositories

Steps To Reproduce:

gitlab.com has a SSRF check in both webhook ([REDACTED]) and CI/CD ([REDACTED])

the one in CI/CD could be bypassed all the two checks 127.0.0.1 / localhost / 127...* , but for network segment 10...* , it was checked in webhooks , but not checked in CI/CD see [REDACTED] and [REDACTED]

notice that attacker could even inject newline into the data see [REDACTED] he could fully control the request data and may turn it into a remote code execution.

Impact

if there is a redis or other server in the intranet , attacker may be able to perform a remote code execution.

The original report as published on GitLab. Images and videos are our own copies; raw HTML is shown as text. View it on GitLab.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could reach internal servers such as Redis and may be able to perform remote code execution.

What the attacker needed

Ability to run CI/CD pipelines for external repositories

How it was found

  1. Set up a CI/CD pipeline for an external repository on gitlab.com.
  2. Configure the pipeline to make a request to an internal address in the 10.*.*.* range.
  3. Observe that the request is not blocked by the CI/CD SSRF check.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

SSRF (Server-Side Request Forgery) is when a website can be tricked into making requests to other servers, including internal ones that are not normally reachable from the internet. Here, the CI/CD feature allowed such requests to private network addresses, which could let an attacker reach internal services like Redis and possibly run commands on them.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.