Skip to content
Info disclosure Disclosed report Beginner

PProf activated by default on 0.0.0.0 leads to debugging stats disclosed via endpoint /debug/pprof/*

The GitLab Workhorse component had pprof debugging enabled by default, listening on a random high port on all interfaces. An attacker could connect to this port without authentication and retrieve debugging statistics, potentially exposing sensitive information.

GitLab

Originally disclosed on GitLab

  • Fixed in 23 days
  • Disclosed after 23 days

⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.

HackerOne report #3030586 by ap-wtioit on 2025-03-11, assigned to @ngeorge1:

Report | Attachments | How To Reproduce

Report

NOTE! Thanks for submitting a report! Please note that initial triage is handled by HackerOne staff. They are identified with a HackerOne triage badge and will escalate to the GitLab team any. Please replace all the (parenthesized) sections below with the pertinent details. Remember, the more detail you provide, the easier it is for us to triage and respond quickly, so be sure to take your time filling out the report!

Summary

We discovered on our own gitlab instance that since one of the last few updates notably when we installed 17.9.1 there is an additional port open for gitlab-workhorse on 0.0.0.0:>32768. This port was connectable with go tool pprof http://gitlab.wt-io-it.at:39129/debug/pprof/heap

Steps to reproduce

(Step-by-step guide to reproduce the issue, including:)
1.) Have gitlab-ee omnibus install 17.9.1.
2.) either locally sudo netstat -lnp --tcpto find the port or in theory it should also be discoverable with nmap remotely (not tested)

   {{media:0}}

3.) use go tool pprof http://gitlab.myhost.com:33895/debug/pprof/heap to connect to the pprof

Impact

Any information that can be retrieved with pprof from workhorse can be retrieved without any authentication or authorization on an up to date gitlab instance that runs on a server reachable to the attacker.

Examples

Not yet explored which information can be extracted from workhorse with pprof

What is the current bug behavior?

The default config for gitlab.rb activates pprof in workhorse.

Gitlabs and pprofs defaults amount to pprof listening on a random tcp port higher than 32768 on 0.0.0.0

What is the expected correct behavior?

The default config for gitlab.rb does not activate pprof in workhorse.

Currently it is possible to deactivate the port with:

gitlab_workhorse['pprof_listen_addr'] = "null"  

in gitlab.rb

Relevant logs and/or screenshots

The check for pprof_listen_add beeing an empty string was moved here and seems no longer working:
https://gitlab.com/gitlab-org/gitlab/-/commit/dbde3ef47079ec133df1711ab537ea474c3b0dba#d4200a33bb56d054b21bc26df7f16b0c6148eeca_194_217

Output of checks
Results of GitLab environment info
System information  
System:		Debian 12  
Proxy:		no  
Current User:	git  
Using RVM:	no  
Ruby Version:	3.2.5  
Gem Version:	3.6.3  
Bundler Version:2.5.11  
Rake Version:	13.0.6  
Redis Version:	7.0.15  
Sidekiq Version:7.2.4  
Go Version:	unknown

GitLab information  
Version:	17.9.1-ee  
Revision:	8f67c219597  
Directory:	/opt/gitlab/embedded/service/gitlab-rails  
DB Adapter:	PostgreSQL  
DB Version:	14.15  
URL:		https://gitlab.wt-io-it.at  
HTTP Clone URL:	https://gitlab.wt-io-it.at/some-group/some-project.git  
SSH Clone URL:	ssh://[email protected]:2022/some-group/some-project.git  
Elasticsearch:	no  
Geo:		no  
Using LDAP:	no  
Using Omniauth:	yes  
Omniauth Providers: github, openid_connect

GitLab Shell  
Version:	14.40.0  
Repository storages:  
- default: 	unix:/var/opt/gitlab/gitaly/gitaly.socket  
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell

Gitaly  
- default Address: 	unix:/var/opt/gitlab/gitaly/gitaly.socket  
- default Version: 	17.9.1  
- default Git Version: 	2.47.2  

Impact

An attacker can connect pprof to a gitlab workhorse.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

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 a configuration change caused the check for an empty pprof_listen_addr to stop working, so pprof remained enabled by default.

Impact

An attacker could retrieve any information available via pprof from Workhorse without authentication, potentially exposing sensitive debugging data.

What the attacker needed

GitLab instance reachable by attacker; GitLab version 17.9.1 (or similar)

The fix

The default configuration should not activate pprof in Workhorse; it can be disabled by setting pprof_listen_addr to null in gitlab.rb.

How it was found

  1. Install GitLab EE omnibus version 17.9.1.
  2. Find the open port locally with netstat; remote nmap discovery is theoretical and untested.
  3. Connect to the pprof endpoint using the go tool pprof command with the discovered port.

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.

GitLab Workhorse is a component that handles HTTP requests. pprof is a Go tool that provides debugging information about a running program. By default, it was turned on and listening on a network port that anyone could reach, so an attacker could connect and read internal details about the server.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.