Behind the Scenes: How I Discovered Flaws in a Rewards and Recogn
The rewards portal's API lacked proper authorization checks, so changing the customer ID in requests let an attacker view another user's reward points, cart, and order history, and redeem coupons using their points. The attacker could also change the email address to receive the coupon codes.
Published on medium.com
Welcome back to my Medium blog! I’m thrilled to have you here and excited to share more engaging content with you.
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 API endpoints used the customer ID from the request to identify the account without verifying it matched the authenticated user.
Impact
An attacker could view other users' reward points, orders, and cart contents, and redeem coupons using their points, receiving the codes at an email address they control.
What the attacker needed
A valid user account; knowledge of another user's customer ID
How it was found
- Use own reward points to redeem a coupon and capture the API calls.
- Call the coupon details API with a product ID to see coupon name and amount.
- Call the add-to-cart API with another user's customer ID to add coupons to their cart.
- Call the balance API to check the victim's reward points and redeem points for coupons.
- Call the order API and change the email address to receive the coupon codes.
- Receive an order confirmation email; coupon codes arrive after a delay.
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.
The website trusted a number (the customer ID) sent in each request to decide whose account to show, without checking that the logged-in user actually owned that account. By swapping in someone else's ID, a user could see and act on that person's rewards data. This is called an insecure direct object reference (IDOR), a kind of access control bug.
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.