A Day Of Bounty Bonanza Discovering Two Bugs Back To Back
The merchandise subdomain allowed a user to add products to another user's cart by changing the cart ID in the request, and an order details endpoint exposed another customer's primary contact information when the order ID was changed. An attacker could tamper with other users' carts and view their email or phone number along with ordered items.
Published on infosecwriteups.com
So, this story is about two bugs I found in a single day, both within the same target. Both bugs are located in the same feature.
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 server used user-supplied identifiers (cart ID and order ID) to select records without verifying that those records belonged to the authenticated user.
Impact
An attacker could add products to any user's cart, though the number of products was limited, and could view another customer's email or phone number and ordered item if they knew or brute-forced the order ID.
What the attacker needed
A free account; knowledge of another user's cart ID; knowledge or brute-force of an order ID
How it was found
- Create two accounts and add an item to the first account's cart.
- Intercept the add-to-cart request and note the cart ID in the URL.
- Change the cart ID to the second account's cart ID and send the request.
- Observe that the product was added to the second account's cart.
- Place an order and request the primary contact details endpoint with your own order ID.
- Change the order ID to another user's order ID and observe their contact information and ordered item.
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 cart ID is a unique code that identifies your shopping cart. The site trusted whatever cart ID was sent in the request, so changing it let one person act on another person's cart. Similarly, an order ID was used to look up order details without checking that the order belonged to the person asking, so changing it revealed someone else's contact details.
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.