How Pattern Recognition Led to a Critical IDOR in a Public Portal
The applicant status API used a predictable token ID composed of district code, locality code, a sequential number, and the application date, allowing an attacker to guess other applicants' tokens and access their sensitive personal and financial data.
medium.com
Published on medium.com
This public portal lets people apply for relief funds after wild animal attacks (think elephants or boars wrecking crops or property). The form asks for sensitive stuff: your name, phone number, national ID, bank account details, and even scanned IDs or damage reports.
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 application used a predictable token ID instead of a random, unguessable one, and the API did not verify that the requester owned the application.
Impact
An attacker could harvest names, phone numbers, bank details, and scanned documents, potentially leading to fraud or identity theft.
What the attacker needed
Access to the public portal; Ability to submit applications
How it was found
- Submit an application and observe the token ID in the status page URL.
- Notice that the last six digits match the submission date.
- Submit more applications with dummy data and compare token IDs to identify the pattern.
- Research common district and locality codes to narrow down likely prefixes.
- Generate token IDs by varying the sequential number and date.
- Test the generated tokens against the API to access other applicants' data.
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.
This is an IDOR (Insecure Direct Object Reference), where a system uses a guessable identifier to access a user's data without checking if the requester is allowed. Here, the token in the URL followed a simple pattern, so someone could change it to view other people's applications.
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.