Skip to content
SSRF Disclosed report Intermediate

gitlab did not apply validate_localhost function to import Fogbugz

GitLab's Fogbugz import feature did not validate the target URL against localhost, allowing an attacker to probe internal network ports. The attacker could determine which ports are open on the internal network.

GitLab

Originally disclosed on GitLab

  • Fixed in 21 months
  • Disclosed after 21 months
Link:          https://hackerone.com/reports/402990
By:            @math1as

Details: ##Description: when user try to import project from Fogbugz , gitlab did not check the ip with validate_localhost function, attacker could access to internal network and know which port is open

##Steps To Reproduce:

  1. see a1.jpg , when access to a closed port http://127.0.0.1:8081 , it returns "could not connect"
  2. see a2.jpg , when access to port 8080 opened to localhost , it returns "looks like there was an issue"

##Impact: attacker could access to local and internal service.

##Fix: when user try to import a third-party project , the URL must match its domain. or just apply the validate_localhost function to it.

Impact

attacker could access to local and internal service.

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

Root cause

Likely the Fogbugz import feature failed to apply the existing validate_localhost function to the user-supplied URL, allowing requests to internal addresses.

Impact

An attacker could access local and internal services, potentially discovering open ports.

What the attacker needed

Access to GitLab project import feature

The fix

The URL should be validated to match its domain, or the validate_localhost function should be applied.

How it was found

  1. Access a closed port on localhost and observe a connection error.
  2. Access an open port on localhost and observe a different error message.

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.

When you import a project from another service, you give a web address. GitLab did not check whether that address pointed to its own internal network. An attacker could use this to scan for open ports on internal servers.

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.