⚡ One Click to Chaos: How I Chained CSRF with Open Redirects for Account Takeover
A GraphQL endpoint accepted a redirect parameter that sent users to an attacker-chosen site, and the password reset function accepted a POST without a CSRF token. Chaining the two, an attacker could make a victim's account password change to one the attacker chose after a single click.
infosecwriteups.com
Published on infosecwriteups.com
Free link 🎈
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 password reset endpoint accepted state-changing POST requests without a CSRF token, and a GraphQL redirect parameter allowed arbitrary external destinations.
Impact
An attacker could take over a victim's account by resetting the password to one they control, provided the victim clicks the crafted link.
What the attacker needed
Victim clicks a crafted link; victim is logged in or has an account; attacker knows the victim's email
How it was found
- Find an old GraphQL endpoint with a redirect parameter pointing to an external site.
- Confirm the password reset POST works without a CSRF token.
- Build a form that posts the victim's email and a new password to the endpoint.
- Send the form link to the victim by phishing email.
- The victim clicks, is redirected, and the CSRF request fires.
- Log in to the victim's account with the new password.
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 the user did not intend, because the site trusts any request coming from that browser. Here the password reset form had no secret token to prove the request was genuine, and an open redirect let the attacker bounce the victim to a page they controlled. Together, one click could hand over the account.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.