November 6, 2026
IDOR in the medical report viewer
The “View report” link had a long token, so it looked secure.
By FireSF{}
1 min read
The "View report" link had a long token, so it looked secure.
It wasn't. It was base64-encoded JSON.
I decoded my own token and saw:
{"user_id": 1485, "report_id": 9416}{"user_id": 1485, "report_id": 9416}
No signature. No session binding. Just two numbers.
I created a second test account, took its user ID and report ID, encoded them the same way, and requested the report while logged in as the first account.
Second account Token
That was Email : qa21793548256@example.com
{"user_id": 1997, "report_id": 9411}{"user_id": 1997, "report_id": 9411}
The server returned the second account's private medical report: name, email, phone, laboratory, status, and result.
Fix:
- Do not put object IDs in a client-readable authorization token
- Use an opaque, signed, short-lived token — or no token at all
- Always check that the report belongs to the session user
- Use random public IDs and log access