Skip to content
XSS Write-up Beginner

Stored XSS via File upload(using .svg file Extension )

The author found file upload functions that accepted SVG files containing script, and the uploaded files executed script when viewed, causing stored cross-site scripting. The first report was marked duplicate; the second was submitted after a successful upload in a contact form.

ch4ndan Follow

Published on ch4ndan.medium.com

I think manual this the best way for find upload functionality. and don’t forget to check contact us , upload profile , you can also check in chat bot Fn.

Ch4ndan das, on ch4ndan.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

Root cause

Likely the upload feature accepted SVG files without sanitising or blocking embedded scripts, and served them in a way that let the browser execute them.

Impact

An attacker could run script in the browser of anyone who views the uploaded SVG, which may lead to actions on behalf of the victim; the text does not describe any further impact.

What the attacker needed

A file upload feature that accepts SVG; victim views the uploaded file

How it was found

  1. Find file upload functions on the target site.
  2. Create an SVG file containing a script.
  3. Upload the SVG file through the upload function.
  4. Confirm the file uploads successfully 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.

A website let people upload files. If it accepts an SVG image, that file can contain a small script. When someone later opens the uploaded file, the script runs in their browser, which is called stored cross-site scripting.

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 ch4ndan

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.