How I Got 1-Click ATO through self-XSS
The update profile API lacked a CSRF token, allowing an attacker to change a victim's profile information. The name parameter was also vulnerable to stored self-XSS, so chaining the CSRF with an XSS payload could lead to full account takeover by stealing cookies.
This time I want to write about how I was able to escalate a self-XSS to gain a 1-click full account takeover.
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 update profile endpoint did not require a CSRF token, and the name field was not sanitised, allowing stored script injection.
Impact
An attacker could change a victim's profile information and inject a script that steals cookies, leading to full account takeover.
What the attacker needed
Victim is logged in; victim visits attacker's page or clicks link
How it was found
- Test the update profile API and notice it lacks a CSRF token.
- Create a proof-of-concept request that changes the victim's profile information.
- Send the request to the victim to perform CSRF.
- Discover that the name parameter is vulnerable to stored self-XSS.
- Update the CSRF payload to include an XSS payload in the name parameter.
- Send the updated request to inject the XSS into the victim's profile.
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 value that a website expects in requests that change data, to ensure the request comes from its own pages. Without it, another site can make a logged-in user's browser send a request that changes their profile. Self-XSS means a user can inject a script into their own profile, but here the missing CSRF token let an attacker do it for them.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.