Skip to content
XSS Write-up Beginner

Stored XSS by bypassing signature

The platform allowed uploading an avatar file with a text/html content type, and by adding a ctype parameter to the URL, the file was served as HTML, enabling stored cross-site scripting. An attacker could execute arbitrary JavaScript in the context of the victim's browser.

Abdulrahman Makki Follow

Published on amakki.me

Bounty$3,500 View original

Today, i’m going to share with you how i found Stored Cross-Site Scripting (XSS) and bypassed the signature on a platform and reported it.

Abdulrahman Makki | عبدالرحمن مكي, on amakki.me

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 application did not validate the content type of uploaded files and allowed clients to override the content type via a URL parameter, leading to stored XSS.

Impact

An attacker could execute arbitrary JavaScript in the context of the victim's browser, potentially leading to account compromise or other malicious actions.

What the attacker needed

A user account; victim visits the crafted URL

How it was found

  1. Go to the edit profile page.
  2. Upload an image file as avatar with text/html content type and script in the body.
  3. Add ?ctype=text/html to the end of the URL.
  4. The page content is changed to HTML and the script executes.

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 website let users upload a profile picture. The author uploaded a file that was actually a web page with a script. By adding a special parameter to the file's web address, the site displayed the file as a web page, so the script ran. This lets an attacker run code in other users' browsers.

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 Abdulrahman Makki

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.