Skip to content
XSS Write-up Intermediate

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.

cyb3rc4t Follow

Published on cyb3rc4t.medium.com

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.

CYB3RC4T, on cyb3rc4t.medium.com

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

  1. Find the profile picture upload feature on the subdomain.
  2. Intercept the upload request and change the file extension to .html while keeping the content type as image/png.
  3. Add an HTML payload to the request body and forward the request.
  4. Receive a successful response with a path like user/profile/userhash.html.
  5. Visit the uploaded file path on the main site and observe the script executing.
  6. 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.

More by cyb3rc4t

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.