Information disclosure
PortSwigger Web Security Academy · Practitioner
- #Information disclosure

Information Disclosure in Version Control History
The vulnerability
The .git folder is on the web server. You can download it and look at older commits. One of them removed the admin password, so it’s still in the history.
Fix: Don’t deploy the .git folder. If a password was ever committed, change it.
The lab
This lab discloses sensitive information via its version control history. To solve the lab, obtain the password for the administrator user then log in and delete the user carlos.
Solution
1. Test for a Git Repository: In Burp Suite, go to Repeater and send a GET request to the path /.git. An HTTP/2 200 OK response indicates that a Git repository is exposed.
2. Download the Git Repository: Open a terminal and use a command-line tool like wget to recursively download the exposed .git directory. Use the command wget -r https://[LAB_URL]/.git (replace [LAB_URL] with the lab's URL).
3. Inspect the Commit History: Use a Git client like GitHub Desktop or a command-line tool to open the downloaded repository. Review the commit history for changes to files that may contain sensitive information.

4. Find the Administrator’s Password: In the commit history, a previous commit will contain a file change that reveals the administrator’s password. Note down this password.
5. Log In and Solve the Lab: Log in to the application using the username administrator and the password you found in the commit history. Go to the admin panel and delete the user carlos to solve the lab.