Skip to content
Info disclosure Disclosed report Beginner

Username and password disclosed from mirror repository error message when mirroring failed

When a user sets up a repository mirror with Git credentials and the mirror fails, GitLab displays an error message that includes the username and password. Other manager-level users could see these 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 #2520722 by gudanggaramfilter on 2024-05-26, assigned to GitLab Team:

Report | Attachments | How To Reproduce

Report

Summary

When a user forces a push, Update now ( ) GitLab leaks the user's password when adding a mirror with GIT credentials. When you press in the Mirroring repositories section it displays username and password errors.

Steps to reproduce
  1. Create a Project
  2. Click Settings -> Repository
  3. Click expand on Mirroring repositories
  4. Enter the url git://00000000.01020304.rbndr.us:1339/aaaa/aaaa
  5. Fill in your username and password (your secret)
  6. Click mirror repository to create a mirror.
  7. Press the update now button

8 You can see your username and password in the error message.

Cuplikan_layar_2024-05-26_100819.png
Cuplikan_layar_2024-05-26_100819.png From the original on GitLab

Additional: If you get the error message The remote mirror URL is invalid. please press update now again / recreate the URL from the first step.

Impact

Other manager-level users may see passwords from incorrect mirrors that may have been set by other managers.

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 the error message includes the full remote URL with embedded credentials without redaction.

Impact

Other manager-level users may see passwords from incorrect mirrors that may have been set by other managers.

What the attacker needed

Ability to create a mirror with credentials

How it was found

  1. Create a project.
  2. Go to Settings -> Repository.
  3. Expand the Mirroring repositories section.
  4. Enter a git:// URL and fill in your username and password.
  5. Click 'Mirror repository' to create the mirror.
  6. Press the 'update now' button and observe the error message containing your credentials.

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.

A repository mirror is a copy of a project kept in sync with another location. When setting up a mirror, you provide a username and password so GitLab can access the remote repository. If the mirror fails, GitLab shows an error that accidentally includes those credentials, so other users with manager access can see them.

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.