Skip to content
Info disclosure Disclosed report Beginner

Exposed .git/config File Leading to Potential Sensitive Information Disclosure

The .git/config file was publicly accessible on the target server, exposing repository configuration details. An attacker could use this to reconstruct the full source code repository and extract sensitive information such as remote URLs and developer identities.

zoroo2 Follow

Originally disclosed on HackerOne

  • Disclosed after 2 days

Summary:

The .git/config file is publicly accessible on the target server, which may expose sensitive repository configuration details. This indicates that the .git directory is improperly exposed, potentially allowing attackers to reconstruct the entire source code repository and extract sensitive information.

Although the website may not be explicitly listed in scope, this issue represents a significant security misconfiguration that could impact the organization’s infrastructure and code integrity.

Steps To Reproduce:

curl "https://curl.se/dash/.git/config" -X GET -i   -k -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "User-Agent: Mozilla%2F5.0%20%28Windows%20NT%2010.0%3B%20Win64%3B%20x64%29%20AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome%2F141.0.0.0%20Safari%2F537.36" -H "Host: curl.se" -H "Connection: Keep-alive"

Additional Notes:

Even if this specific asset is out of scope, exposed .git directories are widely recognized as misconfigurations and may still be considered under “good faith” reporting due to their security implications.

POC

image.png
image.png From the original on HackerOne

Impact

Summary:

Exposure of internal repository configuration Remote repository URLs Developer usernames/emails Deployment structure Possibility to dump the full repository using publicly available tools Source code disclosure Credential leakage

The original report as published on HackerOne, by zoroo2. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 was misconfigured to serve static files from the project root without blocking access to the .git directory.

Impact

An attacker could dump the full repository, leading to source code disclosure and credential leakage, though the report notes the asset may be out of scope.

What the attacker needed

None

The fix

The .git directory should not be publicly accessible.

How it was found

  1. Send a request to the .git/config path on the target host.
  2. Observe that the server returns the configuration file contents.

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 developers use Git for version control, a hidden folder called .git stores the project's history and settings. If a web server accidentally serves this folder, anyone can download it and rebuild the source code. This report found that one such file was reachable over the internet.

What is Info disclosure?

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

More from curl

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.