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.
Published on amakki.me
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.
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
- Go to the edit profile page.
- Upload an image file as avatar with text/html content type and script in the body.
- Add ?ctype=text/html to the end of the URL.
- 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.