Skip to content
Info disclosure Disclosed report Beginner

Dependency Proxy Credentials are Logged in Plaintext in graphql Logs

The Dependency Proxy credentials entered by users were written in plaintext to the graphql_json.log file. Anyone with access to the logs, such as GitLab employees or administrators, could read those credentials.

GitLab

Originally disclosed on GitLab

  • Fixed in 4 months
  • Disclosed after 4 months

⚠️ 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 #2477062 by ac7n0w on 2024-04-24, assigned to @ngeorge1:

Report | How To Reproduce

Report

Summary

While attempting to submit a report for https://hackerone.com/reports/2466205, I made several attempts to identify why the issue could not be reproduced, which led me to go through a large number of logs.

By chance, I noticed that the plaintext credentials for the Dependency Proxy that I had added and modified were visible in /var/log/gitlab/gitlab-rails/graphql_json.log. At the time, I didn't realize anything was amiss.

It was only after successfully reproducing issue #2466205 on gitlab.com that a sense of unease set in. If I had used my actual Dependency Proxy address, then any GitLab employee with access to the logs could have obtained my credentials.

Recognizing the significant security risk this posed, I decided to report this issue.

I confirmed the vulnerability on versions v16.10.2-ee and v16.11.0-ee. To test this, you must install version 16.xx.xx-ee (not the CE version) and have a license to enable Ultimate features. If you do not have a license, you can obtain one by following the instructions in the hackerone-triage-team-gitlab-licenses.

Steps to Reproduce
  1. Install GitLab v16.11.0-ee on a server <host>, and create a project with root <repo_name>.
  2. Navigate to root/<repo_name> -> [Settings] -> [Packages and registries], and locate the Dependency Proxy settings at the bottom of the page.
  3. Enable [Enable Dependency Proxy] and enter the URL, Username, and Password, for example, you might enter the password PasswordLeakFlag.
  4. SSH into the <host> server: ssh root@<host>.
  5. Use the grep command to search for PasswordLeakFlag (a quick method, but you can also directly locate and open the graphql_json.log file where you will find the password in plaintext):
Shell
grep -r "PasswordLeakFlag" /var/log/gitlab/  

Impact

  1. For GitLab self-managed instances, the Dependency Proxy credentials entered by users could be exposed to anyone with access to the logs.
  2. For gitlab.com SAST, the plaintext credentials of both users and enterprises for the Dependency Proxy are stored in logs, which may be ingested into various log analysis and statistical platforms, potentially exposing them to GitLab employees of different roles.

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

Impact

Dependency Proxy credentials could be exposed to anyone with log access, including GitLab employees of different roles on gitlab.com, and may be ingested into log analysis platforms.

What the attacker needed

GitLab EE with Ultimate licence; access to server logs

How it was found

  1. Install GitLab EE and create a project.
  2. Open the project's Dependency Proxy settings.
  3. Enable the proxy and enter a URL, username and password.
  4. Log in to the server over SSH.
  5. Search the GitLab logs for the password and find it in plaintext.

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 set up a service like a dependency proxy, you provide a username and password. The application is supposed to keep those secret. Here, it wrote them into a log file in readable form, so anyone who can open the log can see the password.

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.