Bug Bounty Findings: Unauthorized Addition of Shipping Addresses
The shipping address and add-to-cart endpoints did not validate CSRF tokens, so an attacker could silently add a shipping address or cart item to a logged-in user's account. The author demonstrated this with a proof-of-concept page that auto-submits a form.
Friend link: https://infosecwriteups.com/bug-bounty-findings-unauthorized-addition-of-shipping-addresses-and-shopping-carts-via-csrf-f62d88071dd6?sk=64b78c7e802901f8a657915a8e4fb0be
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 server did not validate the CSRF token on state-changing endpoints, accepting requests when the token was removed entirely.
Impact
An attacker could silently add a shipping address or items to a logged-in user's cart, potentially abusing the purchase flow, though the report does not show further exploitation.
What the attacker needed
Victim is logged in; victim visits attacker page
The fix
The application should validate a unique, unpredictable CSRF token on every state-changing request and reject requests with a missing or mismatched token.
How it was found
- Capture the POST request that adds a shipping address and note the csrfToken parameter.
- Send the request with an incorrect csrfToken value and observe a 301 redirect.
- Remove the csrfToken parameter entirely and observe a 200 OK response.
- Refresh the shipping address page to confirm the address was added.
- Test the add-to-cart endpoint by removing the CSRF token and observe a 200 OK response.
- Check the account to confirm the item was added to the cart.
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 CSRF attack tricks a logged-in user's browser into sending a request to a site they are already signed in to. Here, the site accepted requests to add a shipping address or cart item even when the security token that should prove the request came from the site itself was missing. An attacker could host a page that quietly sends such a request when a victim visits it.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.