Skip to content
SSRF Disclosed report Intermediate

Potensial SSRF via Git repository URL

GitLab instances with project imports via 'Repo by URL' were vulnerable to SSRF, allowing an attacker to specify a localhost URL and target services bound to the server's local interface. Depending on the service, the attacker might craft an attack using the import request URL.

rootbakar___ Follow

Originally disclosed on HackerOne

  • Disclosed after 48 days

Summary by the program

Duplicate: Fixed in 8.17.4, 8.16.8, and 8.15.8 Original report: https://hackerone.com/reports/135937

SSRF when importing a project from a Repo by URL

GitLab instances that have enabled project imports using "Repo by URL" were vulnerable to Server-Side Request Forgery attacks. By specifying a project import URL of localhost an attacker could target services that are bound to the local interface of the server. These services often do not require authentication. Depending on the service an attacker might be able craft an attack using the project import request URL.

This update blocks all import attempts from localhost and all bound server interfaces other than those assigned as GitLab web or SSH services (Typically ports 22 and 443). This update also blocks all import attempts from TCP ports below 1024 with the exception of ports 22, 80 and 443. 17286

Thanks to Strukt via HackerOne for reporting this vulnerability.

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

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

Root cause

Likely the project import feature did not validate or restrict the destination URL, allowing requests to localhost and internal interfaces.

Impact

An attacker could target services bound to the local interface, which often lack authentication, and might craft an attack using the import request URL; the fix blocks localhost and low ports except 22, 80, and 443.

What the attacker needed

GitLab with 'Repo by URL' imports enabled; Ability to create a project import

The fix

The update blocks import attempts from localhost and bound server interfaces other than GitLab web or SSH services, and blocks TCP ports below 1024 except 22, 80, and 443.

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.

This is a server-side request forgery (SSRF) bug. When you import a project from a URL, the GitLab server fetches that URL. An attacker could give a URL pointing to the server itself (localhost), making GitLab send requests to internal services that are not normally reachable from the internet. Those internal services often have no authentication, so the attacker might be able to interact with 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 by rootbakar___

View all

5 more disclosed reports, best first.

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.