Securing 10 000 Restaurants Customer Pii Data
An unauthenticated API endpoint allowed fetching customer PII using a predictable numeric order code, and another endpoint exposed the order code from the numeric ID. An attacker could enumerate orders to retrieve names, phone numbers, addresses, emails, bill data and IP addresses of hundreds of thousands of customers.
Published on infosecwriteups.com
This write-up is about how I discovered a critical vulnerability that led to several hundred thousand customer PII like their Name, Phone Number, House Address, Delivery Rider’s Phone Number and name, Email ID, Bill data, and IP address.
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 order lookup APIs lacked authentication and authorisation checks, and the order code was derivable from a sequential numeric identifier.
Impact
An unauthenticated attacker could retrieve PII of hundreds of thousands of customers, including names, phone numbers, addresses, emails, bill data and IP addresses.
What the attacker needed
No account needed; access to the public website
The fix
The report says the issue was fixed after being reported to the CTO.
How it was found
- Open the restaurant website and find the main JavaScript file.
- Use a link-finding tool to extract API endpoints and parameters from the JavaScript.
- Call the order-code endpoint with a numeric ID to obtain the order code.
- Call the order PII endpoint with that order code without authentication to retrieve customer 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.
A website's JavaScript file listed hidden API addresses. One API returned customer details if you gave it an order code, and another API turned a simple number into that order code. Because the numbers were easy to guess, anyone could loop through them and download personal data without logging in.
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.