How I Uncovered an LFI in 15 Seconds: The Tale of a Curious Hacker and an Unprepared Server
A download endpoint accepted a filename parameter that was used to read files from the server without validation. An attacker could request a system file and receive its contents, exposing sensitive data.
Published on medium.com
👋 Hi there! I’m Shyam — a security researcher with a knack for finding vulnerabilities faster than your coffee gets cold.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the filename parameter was passed to a file-reading function without checking that it referred to an allowed file.
What the attacker needed
Internet access; no account needed
How it was found
- Search for download endpoints using a Google dork.
- Open the download endpoint with a filename parameter.
- Change the filename parameter to point to a system file.
- Send the request and observe the file contents in the response.
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 write-up has not been written yet. The Original tab links to the source.
A website can let you ask for a file by name. If it does not check the name, you can ask for a file that is not meant to be shared, such as a system file. This is called local file inclusion, and it can leak private information.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.