How I Found a Flaw That Let Me Delete Anyone’s Wishlist on a Major Shopping Site
The server authenticated requests but did not check that the logged-in user owned the wishlist being acted on. Any logged-in user could create, modify, or permanently delete another user's wishlist by supplying that user's wishlist ID with their own session token.
Published on medium.com
While doing some bug bounty hunting, I found a serious IDOR (Insecure Direct Object Reference) flaw on a massive e-commerce platform. It allowed any logged-in user to create, modify, or permanently delete anyone else’s wishlist.
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
The backend only checked for a valid login token and never verified that the token's user owned the wishlist ID in the request.
Impact
An attacker could modify or permanently delete any user's wishlist, and could script this to mass-delete millions of wishlists; because a valid token is used, the activity looks normal in server logs.
What the attacker needed
A free account; victim's wishlist ID
The fix
The backend should verify that the user identity in the token owns the resource ID being requested, and use long random identifiers instead of sequential numbers.
How it was found
- Set up two test accounts, one as attacker and one as victim.
- Intercept the victim's create-wishlist request and replace their token with the attacker's token.
- Send a request with the victim's wishlist ID but the attacker's token to add items to the victim's list.
- Send a delete request with the victim's wishlist ID and the attacker's token to permanently remove the victim's wishlist.
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 wishlist is a personal list of saved products. The site checked that you were logged in, but not that the list belonged to you. So anyone with an account could use another person's list ID to change or delete their list.
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.