A short tell of LFI from PDF link → Professor the Hunter
A PDF link on a recruitment site was vulnerable to local file inclusion, allowing an attacker to read arbitrary files on the server. The author demonstrated reading the system password file.
Published on medium.com
Security Researcher at HackerOne. In 2022, I was in 60th place worldwide as per HackerOne leaderboard.
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.
Context
This is a short write-up of a Local File Inclusion (LFI) finding on a recruitment portal, reached through a PDF download link. The researcher describes the target only as "Redacted's Edge Network", and the host used throughout is erecruitment.redacted.com. The feature involved is a static-looking PDF file served from an /onlineapp/ path, which normally just returns a document to the browser.
The author introduces himself as a security researcher active on HackerOne, noting a 60th place worldwide on the HackerOne leaderboard in 2022, and gives his Twitter handle as @bughuntar.
Setup
No accounts, roles, tools or versions are described. The testing appears to have been done directly against the live host with a browser or a simple HTTP client, since the only artefact shown is a URL. The report describes no accounts or tools; the only artefact shown is a URL.
Finding it
While testing https://erecruitment.redacted.com, the researcher came across a PDF file link:
https://erecruitment.redacted.com/onlineapp/rocketpreepay.pdf
He then tried to provoke an LFI on that link. His first attempts used wrong paths, and every one of them was redirected, which led him to conclude there was no LFI bug. The behaviour changed only when the path was correct: the request then worked instead of redirecting. That difference between a redirect on a bad path and a working request on a good one is what the author observed.
Exploitation
Step 1: request the PDF with a traversal suffix
The payload appends directory traversal sequences directly after the .pdf filename, with no separator, and targets the classic password file:
https://erecruitment.redacted.com/onlineapp/rocketpreepay.pdf../../../../../../../etc/passwd
The ../ sequences climb out of the /onlineapp/ directory. Seven ../ sequences are used. The final component, /etc/passwd, is the file being included.
According to the report, this request worked. The write-up does not show the response body, so the exact contents that came back are not reproduced here.
Root cause
The report does not analyse the server-side code, so the mechanism can only be inferred. The likely cause is that the application takes the requested path and passes it to a file read or include operation without normalising it or restricting it to the intended directory, so the ../ sequences are resolved by the filesystem. The redirect on incorrect paths suggests some routing or validation logic exists, but it evidently did not block traversal appended to a valid filename.
Impact
The author frames the impact in general terms: LFI ranges from information disclosure to complete compromise of the system, and even when included code is not executed it can give an attacker enough information to compromise the host. In this case the payload targets /etc/passwd on the recruitment host. The report does not state which other files were readable, whether code execution was possible, or how the issue was triaged.
Fix
Variants to test
- Append traversal after other static extensions (
.pdf,.jpg,.css) on download endpoints, and compare the response with a deliberately wrong path: a redirect or error on the bad path but file contents on the good one indicates inclusion. - Try traversal with encoded separators (
..%2f,%2e%2e/) and doubled encodings, watching for a response that differs from the plain redirect. - Target files that reveal more than
/etc/passwd, such as application configuration or log files, to judge whether the read primitive extends beyond system accounts. - Test whether the included path can point at attacker-controlled content (for example a log or upload location) to see whether the LFI can be escalated towards execution.
Closing
The author notes the finding was made the same day as the write-up and that he does not yet know how many bounties it will attract if accepted. He invites contact on Twitter under the handle @bughuntar.
Get the Medium app


What happened, in plain words
A security researcher was looking at a recruitment website, the kind of site where people apply for jobs online. On that site he found a link that downloads a PDF document. A PDF is just a file, like a picture or a text document, and normally a web server hands it over and that is the end of the story.
But the way this particular server handled the request for that PDF was flawed. By adding a special piece of text to the end of the link, the researcher found he could make the server read a different file from the computer that runs the website. This kind of flaw is called Local File Inclusion, or LFI for short.
The file he asked for was /etc/passwd. That is a well known file on Linux and Unix computers, the operating systems that run a large share of the world's web servers. It lists the user accounts that exist on the machine. It does not normally contain passwords in a readable form, but it is a classic proof that you can read files you should not be able to read.
The researcher describes the target only as "Redacted's Edge Network", and the site he tested is erecruitment.redacted.com. The report does not say which company owns it, what bounty was paid, or whether the issue was ever fixed.
Who wrote this
The author introduces himself as a security researcher active on HackerOne, a platform where companies publish bug bounty programmes and researchers report flaws to them. He says that in 2022 he was in 60th place worldwide on the HackerOne leaderboard, a public ranking of researchers by reputation. He gives his Twitter handle as @bughuntar.
A bug bounty programme, in case the term is new, is an arrangement where a company says: if you find a security problem in our systems and tell us about it responsibly, we will reward you, usually with money. The reward is called a bounty.
The setup
The report describes no accounts, no special tools and no software versions. The only thing shown is a web address, which suggests the testing was done with a browser or a simple program that sends web requests.
Finding it
While testing https://erecruitment.redacted.com, the researcher came across a link to a PDF file:
https://erecruitment.redacted.com/onlineapp/rocketpreepay.pdf
Let us take that address apart, because every part matters later.
https://is the protocol, the set of rules the browser and the server use to talk. Thesstands for secure: the traffic is encrypted.erecruitment.redacted.comis the name of the server. Theredacted.compart is the company's domain, anderecruitmentis a subdomain, a named section of that domain. The name suggests an online recruitment service./onlineapp/is a folder path on the server. Think of the server's storage as a filing cabinet with folders inside folders. This says: look in the folder calledonlineapp.rocketpreepay.pdfis the file itself. The.pdfending tells the browser it is a PDF document.
He then tried to provoke an LFI on that link. His first attempts used wrong paths, and every one of them was redirected. A redirect is when the server does not give you the page you asked for but instead sends your browser somewhere else, usually with a message like "that is not here, go over there instead". That is a normal, safe reaction to a request for something that does not exist.
Because every wrong attempt was redirected, he concluded there was no LFI bug. The behaviour changed only when the path was correct: the request then worked instead of redirecting. That difference, a redirect on a bad path and a working request on a good one, is what the author observed. It is worth pausing on why that matters: a server that always redirects looks closed, but a server that redirects on bad input and succeeds on good input is telling you it is actually reading whatever you name.
Exploitation
Step 1: request the PDF with a traversal suffix
The payload appends directory traversal sequences directly after the .pdf filename, with no separator, and targets the classic password file:
https://erecruitment.redacted.com/onlineapp/rocketpreepay.pdf../../../../../../../etc/passwd
Line by line, in plain words:
https://erecruitment.redacted.com/onlineapp/rocketpreepay.pdfis the same innocent PDF link as before. Keeping it at the front makes the request look like a normal document download to anyone glancing at it.../is the key ingredient. In file paths, two dots mean "the folder above this one". If you are in/onlineapp/and you write../, you step up to the folder that containsonlineapp. This is called directory traversal, or path traversal: using../over and over to walk upwards through the folder structure.../../../../../../../repeats that step seven times. Seven levels is more than enough to climb from a typical web folder all the way up to the top of the filesystem, the root, which is written as a single/./etc/passwdis the file being included. On Linux and Unix systems,/etcis a folder of system configuration files, andpasswdinside it lists the user accounts on the machine.
So the whole request says, in effect: start at the PDF, then climb seven folders up, then open /etc/passwd and give it to me. The server should have refused, because /etc/passwd is nowhere near the onlineapp folder and is not a public document. Instead, according to the report, the request worked.
The write-up does not show the response body, so the exact contents that came back are not reproduced here.
Why this happens
A web server receives a request for a file and has to decide what to do with it. A well built one takes the requested path, cleans it up (this is called normalising), and checks that the result still sits inside the folder it is allowed to serve. If it does not, the server refuses.
The report does not analyse the server-side code, so the mechanism can only be inferred. The likely cause is that the application takes the requested path and passes it to a file read or include operation without normalising it or restricting it to the intended directory, so the ../ sequences are resolved by the filesystem itself. The redirect on incorrect paths suggests some routing or validation logic exists, but it evidently did not block traversal appended to a valid filename.
A simple comparison: imagine a librarian who is told "fetch the book called rocketpreepay.pdf from the onlineapp shelf". A careful librarian checks the shelf and says the book is not there. A careless one reads the whole instruction literally, including the part that says "then walk seven aisles back and open the staff ledger", and brings you the ledger.
What an attacker could do with it
The author frames the impact in general terms: LFI ranges from information disclosure to complete compromise of the system, and even when included code is not executed it can give an attacker enough information to compromise the host. In this case the payload targets /etc/passwd on the recruitment host.
Information disclosure means simply learning things you were not supposed to know: file contents, account names, configuration details. Complete compromise means taking control of the machine. The gap between the two is often smaller than it sounds, because files on a server frequently contain clues, such as where other files live or how the application is configured, that help an attacker go further.
Was it fixed?
Other things worth trying
These are the kinds of variations a tester would try next on a similar endpoint. They are listed here as directions, not as claims about what happened on this target.
- Append traversal after other static extensions (
.pdf,.jpg,.css) on download endpoints, and compare the response with a deliberately wrong path: a redirect or error on the bad path but file contents on the good one indicates inclusion. - Try traversal with encoded separators (
..%2f,%2e%2e/) and doubled encodings, watching for a response that differs from the plain redirect. Encoding means writing a character in a coded form, for example%2finstead of/, so that a filter looking for a plain slash may not notice it. - Target files that reveal more than
/etc/passwd, such as application configuration or log files, to judge whether the read primitive extends beyond system accounts. A log file is a running record of what the server has done, and configuration files often hold database addresses and credentials. - Test whether the included path can point at attacker-controlled content (for example a log or upload location) to see whether the LFI can be escalated towards execution.
Closing
The author notes the finding was made the same day as the write-up and that he does not yet know how many bounties it will attract if accepted. He invites contact on Twitter under the handle @bughuntar.
Get the Medium app


Glossary
- LFI (Local File Inclusion): a flaw where a web application lets a visitor make the server read a file from its own disk that was never meant to be served.
- Directory traversal (path traversal): using
../sequences in a path to climb out of the intended folder and reach other parts of the filesystem. - Payload: the crafted piece of input, here the URL with the traversal sequences, that is sent to the server to trigger the flaw.
- PoC (proof of concept): a minimal demonstration that a flaw is real, such as the single URL in this report.
- URL: the address of something on the web, made of protocol, server name and path.
- Protocol (HTTPS): the rules browsers and servers use to exchange requests and responses; HTTPS is the encrypted version.
- Domain and subdomain: the main name of a site (
redacted.com) and a named section in front of it (erecruitment.redacted.com). - Path: the part of a URL that points to a folder or file on the server, such as
/onlineapp/rocketpreepay.pdf. - Redirect: a server response that sends the browser to a different address instead of returning the requested content.
/etc/passwd: a standard file on Linux and Unix systems listing user accounts; commonly used to prove that arbitrary file reads are possible.- Root (
/): the top level of a filesystem, from which all folders branch downwards. - Normalisation: cleaning up a path so that
../and similar tricks are resolved before any safety check is made. - Information disclosure: leaking information to someone who should not have it, without necessarily taking control of anything.
- Code execution: making the server run instructions supplied by an attacker, the most serious outcome of many flaws.
- Encoding (
%2f): writing a character in a coded form so that filters looking for the plain character may miss it. - Log file: a record the server keeps of events and requests, sometimes containing text an attacker can influence.
- Bug bounty programme: a scheme where a company rewards researchers for reporting security flaws responsibly.
- Bounty: the reward, usually money, paid for an accepted report.
- HackerOne: a platform where bug bounty programmes are published and reports are submitted.
- Leaderboard: a public ranking of researchers on such a platform, based on reputation points.
- Triage: the process of reviewing a report, confirming the flaw and deciding how serious it is.