Beyond Ram And Rom Idor Leads To Unauthenticated File Upload Vulnerability In Indian Government
A complaint portal used a Base64-encoded complaint number in a URL parameter to decide which user's photo upload page to show, without checking that the requester owned that complaint. By changing the encoded number, an attacker could reach another user's file upload page and upload files there.
Published on systemweakness.com
A brand new laptop with a high-end processor started getting stuck within a month of purchase. I decided to inform their customer care about the issue, but I didn’t receive a satisfactory response.
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 upload page trusted the complaint number supplied in the URL and never verified that the visitor was the owner of that complaint.
What the attacker needed
A valid complaint link; victim's complaint number known or guessed
The fix
The site was fixed by adding a step that asks for the registered mobile number and only allows uploads when it matches the user's registered number.
How it was found
- Open the photo upload link received by email and SMS.
- Note that the complaint number in the gno parameter is Base64 encoded.
- Decode the number, change it to a different complaint number, and re-encode it.
- Open the rebuilt link and observe another user's upload page.
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 web page often puts an identifier in the address, such as a complaint number, and uses it to look up the right record. If the site trusts that identifier without checking that you are allowed to see that record, you can swap in someone else's number and reach their page. This is called an insecure direct object reference, or IDOR.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.