Skip to content
Info disclosure Disclosed report Beginner

Local File Disclosure on the ████████ (https://████/) leads to the source code disclosure & DB credentials leak

A file handler on the site accepted a path parameter and returned any server-side file, including the web configuration file and application source code. An attacker could read database credentials and source code to further compromise the resource.

sp1d3rs Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 16 months
  • Disclosed after 16 months

##Description I discovered another LFD on the https://████/ (virtual host on the █████ IP)

##POC https://█████/file.ashx?path=web.config will download the website configuration file. It exposes different DB credentials than in previous reports: ███

Similarly, attacker able to get content of any server-side file, such as source code of application: https://███/file.ashx?path=index.aspx

Impact

Source code & sensitive configuration data leakage. Attacker can use it to compromise the resource.

The original report as published on HackerOne, by sp1d3rs. 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 file handler trusted a user-supplied path and did not restrict it to an allowed directory or file list.

Impact

An attacker could read source code and sensitive configuration data, including database credentials, which could be used to compromise the resource.

What the attacker needed

None

How it was found

  1. Request the file handler with the path set to the web configuration file.
  2. Observe that the configuration file is downloaded and contains database credentials.
  3. Request the same handler with the path set to an application source file.
  4. Observe that the source code is returned.

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 web page had a feature that took a file name from the address bar and sent back that file from the server. It did not check which files were allowed, so anyone could ask for private files such as the site's settings, which held database passwords.

What is Info disclosure?

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

More by sp1d3rs

View all

62 more disclosed reports, best first.

More from U.S. Dept Of Defense

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.