PoC: IDOR Leads to XSS on Profile Dashboard
A profile edit request used the email parameter as the user identifier without checking that the caller owned that account, and the name field was not sanitised. An attacker could change another user's name to a script payload, which then ran on the victim's dashboard.
Published on medium.com
This article is an educational case study. All emails, usernames, URLs, and screenshots have been redacted to protect privacy.
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 server used the client-supplied email as the record selector without an ownership check, and stored the name without output encoding.
Impact
An attacker could modify another user's profile and run script in that user's dashboard session, though the proof only shows an alert box.
What the attacker needed
An account on the site; knowledge of the victim's email; victim opens their dashboard
The fix
The server should check that the authenticated user owns the target account and should escape or filter all user-controlled input before rendering it.
How it was found
- Open the profile dashboard as the attacker and as the victim in a private window.
- Click Edit to capture the profile POST request containing email, name and filename.
- Change the email parameter to the victim's email and the name parameter to a script payload.
- Send the modified request; the server replies with a redirect to the dashboard.
- Check the victim's dashboard, where the script runs.
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 website often trusts a value sent by your browser to decide which account to change. Here the email address in the request was trusted, so anyone could put someone else's email in and edit their profile. The name field also accepted a small script, which ran when the victim opened their dashboard.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.