Crazy CSRF (Cross Site Request Forgery) — How did I find it?
The password reset request returned a CSRF token that remained valid for all subsequent sensitive actions for that user. An attacker who could obtain the victim's token could then submit sensitive requests, such as changing the email address, on the victim's behalf.
Hello guys, Hope all are doing good. I’m Abhisek, here’s a small write up on CSRF vulnerability I found in a Bug Bounty program.
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 application issued a single CSRF token that was not tied to a specific action or session and did not rotate it, so a token obtained from one request was accepted for other sensitive requests.
Impact
An attacker who obtained the victim's token could perform sensitive actions such as changing the account email, though the write-up does not explain how the token would be obtained or whether the JSON request format was overcome.
What the attacker needed
Attacker obtains the victim's CSRF token; victim's phone number or email known
The fix
The application should issue a unique, random CSRF token per user and validate it on every sensitive action, rather than reusing one token across the whole application.
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 token is a secret code a website puts in forms so it can tell that a request really came from its own pages and not from another site. Here the token given out during a password reset kept working for other actions, so anyone who got hold of it could act as the user. The write-up does not explain how an outside attacker would obtain the token.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.