Stored XSS & Privilege Escalation in Profile Field -Private Program
The profile picture upload accepted a file with an HTML payload in its body while keeping the image content type, and the uploaded file was served as .html, causing stored XSS. Separately, a UUID in the profile picture field allowed privilege escalation, and the UUID could be obtained from the forgot password response.
I monitor my targets using some free open sources. This morning, when I checked my mail, I received a mail about new domains that were added.
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
What the attacker needed
A user account; ability to upload a profile picture; victim visits the uploaded file URL
How it was found
- Find the profile picture upload feature on the subdomain.
- Intercept the upload request and change the file extension to .html while keeping the content type as image/png.
- Add an HTML payload to the request body and forward the request.
- Receive a successful response with a path like user/profile/userhash.html.
- Visit the uploaded file path on the main site and observe the script executing.
- For privilege escalation, request a password reset for the victim's email and read the UUID from the response.
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.
The site let people upload a profile picture, but it did not properly check what was inside the file. By naming the file with an .html ending and putting a small script inside, the uploaded file ran as a web page and executed code in the browser of anyone who viewed it. Also, a hidden identifier (UUID) used for profile pictures could be found in the password reset response, letting someone change another user's profile picture.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.