An inconsistent CSRF
A shipping address deletion endpoint lacked CSRF protection, and although the address ID parameter varied per user, an attacker could brute-force it from the victim's browser. An attacker could delete a victim's saved shipping address by tricking them into visiting a malicious page.
Published on smaranchand.com.np
I discovered Cross-Site Request Forgery (CSRF) issue in one of the bug bounty programs but limited to some easy and simple actions only.
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 endpoint for deleting a shipping address did not require a CSRF token or any other anti-CSRF mechanism.
Impact
An attacker could delete a victim's saved shipping address, but only after the victim visited a malicious page and the brute-force guessed the correct address ID; the attack could also degrade browser performance.
What the attacker needed
Victim is logged in; victim visits a malicious page; attacker can guess addressId range
How it was found
- Identify the delete address request and note the addressId parameter.
- Create a malicious HTML page with JavaScript that sends many POST requests with different addressId values.
- Trick the victim into visiting the page, causing their browser to send the requests.
- When the correct addressId is guessed, the victim's address is deleted.
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.
Cross-Site Request Forgery (CSRF) is when a malicious website makes a logged-in user's browser send a request to another site without the user's knowledge. Here, the delete-address action had no protection, so a page could silently send many requests to guess the right address number and delete it.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.