How I Chained Recon and IDOR to Access 100's of Credit Cards
The application used a cookie value as an external customer ID in API requests without verifying that the requesting user owned that ID. An attacker could replace their own ID with a victim's ID to retrieve the victim's credit card details, including full card number, expiry date, and default status.
While casually reviewing a private program, I noticed that the target had recently rolled out some new features around user account management.
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 backend API lacked authorization checks to confirm that the authenticated user owned the external_customer_id being requested.
Impact
The vulnerability exposed live credit card data (full card number, expiry date, and default status) for a large set of users, which could be exploited for fraud or identity theft.
What the attacker needed
A free account; victim has stored card details; attacker knows victim's external_customer_id
The fix
The issue was fixed by implementing strict authorization checks on the backend APIs to verify that the requesting user owns the data.
How it was found
- Create two accounts: one victim and one attacker.
- Add fake credit card details to the victim's account.
- Intercept a request from the attacker account to the credit cards endpoint.
- Replace the attacker's external_customer_id with the victim's ID.
- Observe that the server returns the victim's credit card information.
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.
An IDOR (Insecure Direct Object Reference) happens when a website uses an identifier like a user ID to fetch data but does not check if the person making the request is allowed to see that data. Here, the site put a customer ID in a cookie and used it directly in API calls, so changing the ID to someone else's let the attacker see that person's credit card information.
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.