Skip to content
Path traversal Disclosed report Beginner

Local File Disclosure on the █████ (https://████████.edu/) leads to the full source code disclosure and credentials leak

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

sp1d3rs Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 8 hours
  • Fixed in 6 months
  • Disclosed after 4.8 years

##Description During poking around ██████.00/24 range - ██████████ looking for the Cisco devices, I came across ███ which resolved to the https://███████.edu/ While it's a not .mil host, it's likely related to the DoD since it hosted in the DoD-controlled ASN.

I discovered few critical vulnerabilities here, one of them is LFD (local file disclosure).

##POC https://██████.edu/file.ashx?path=web.config will download the website configuration file. It exposes the DB credentials: ███

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

Impact

Source code & DB credentials 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 took a user-supplied path and read the file without checking that it stayed inside an allowed directory or that the requester was authorised.

Impact

Source code and database credentials could be leaked, which the report says an attacker could use to compromise the resource.

What the attacker needed

Reachable file handler endpoint

How it was found

  1. Find the file handler endpoint on the site.
  2. Request the web configuration file through the path parameter.
  3. Observe the configuration file is downloaded and contains database credentials.
  4. Request an application source file through the same parameter to read code.

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 server often has a small program that hands files to visitors, such as images or downloads. Here that program trusted a value in the address bar that named which file to send, so anyone could ask for private files kept on the server, like settings and program code. Those files held the password for the database, which is the store of user data.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

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.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.