Wishlist Logic bug: How I Manipulated Item Quantities Without Access
A wishlist feature let any logged-in user change the purchased quantity on someone else's public registry, and the backend accepted signed 32-bit integers without validation. By sending a very large quantity and repeating the request, an attacker could alter the needed item quantity on a wishlist they did not own.
Hello everyone! I’m Omar Mohamed, also known as 0xnanashi.
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 endpoint lacked an ownership check on the wishlist item and trusted an unvalidated signed 32-bit integer for the quantity, so repeated large values overflowed the stored count.
Impact
An attacker with any account could change item quantities on any public wishlist they do not own, including the needed quantity that only the owner should control.
What the attacker needed
A free account; target wishlist is public
How it was found
- Create your own registry with some test items.
- Switch to another account and visit that registry as a normal user.
- Click 'Mark as Purchased' and intercept the request.
- Send a very large purchased_quantity value and observe the server's limit.
- Send the maximum allowed value, then repeat the request.
- Observe that the needed item quantity changed from 1 to 3.
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 site lets people mark items as bought. The server did not check that the person sending the request actually owned that wishlist, and it also trusted any number it was given for the quantity. So a stranger could change the numbers on someone else's list, which they should never be able to do.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.