Press enter or click to view image in full size
While exploring a state government web application, I came across a feature where users could apply for a service and upload supporting documents.
Pretty standard flow:
Later, users could retrieve their documents through the portal.
Nothing unusual… until I looked at the request behind it.
The application fetched documents using a request like:
/api/getDocument?id=10234At first, it worked as expected — I could access my own uploaded documents.
But something felt off.
The id parameter looked:
And from experience, that’s always worth testing.
Out of curiosity, I modified the request:
/api/getDocument?id=10235Sent it.
And waited.
The server responded successfully.
But the document wasn’t mine.
It belonged to someone else.
I tested a few more IDs (carefully, without abusing the system).
Each time, I could access documents uploaded by different users.
These weren’t just random files.
They included:
Highly sensitive. Personally identifiable. Real.
At this point, the issue was clear:
The application had no proper authorization checks.
It didn’t verify:
Instead, it followed a dangerous logic:
“If the ID exists, return the file.”
This is a classic case of Insecure Direct Object Reference (IDOR).
Join Medium for free to get updates from this writer.
Where:
This wasn’t just a minor bug.
The impact included:
And the scary part?
👉 No advanced skills required
👉 No authentication bypass needed
👉 Just changing a number
Once I confirmed the issue:
The issue was responsibly reported to the concerned authority.
It was acknowledged and fixed.
As a result of this report:
This experience reinforced a powerful lesson:
The most dangerous vulnerabilities are often the simplest.
One parameter.
One small change.
Huge impact.
If you’re into security or bug hunting:
Because sometimes…
Changing one number is all it takes.