Skip to content
XSS Write-up Beginner

Never thought I’d hack it. How I found two XSS on a daily used

The site allowed uploading SVG files as signatures without content sanitisation, so embedded JavaScript executed when the file was viewed. A contacts page also reflected a hidden page parameter into HTML without encoding, allowing script injection.

O iluminado_x86 Follow

Published on medium.com

One day, curiosity kicked in. I thought, let me poke around a bit.

O iluminado_x86, on 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 only checked the file extension and the page parameter was printed into HTML without encoding.

Impact

The stored XSS could lead to session hijacking, account compromise or phishing for anyone who viewed the uploaded signature, while the reflected XSS required a crafted link.

What the attacker needed

A user account able to upload signatures; victim views the uploaded SVG; victim clicks a crafted contacts link

The fix

The security team fixed both issues within a week.

How it was found

  1. Upload an SVG file containing a script as a Company Stamp.
  2. Find the uploaded file's URL in Burp Suite history or the page source.
  3. Open that URL in a fresh browser and observe the script executing.
  4. Add a page parameter to the contacts URL and change its value to see it reflected.
  5. Insert an SVG onload payload into the page parameter and load the URL to trigger the alert.

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.

Cross-site scripting (XSS) is when a website shows attacker-supplied text or files as if they were part of the page, so the browser runs the attacker's JavaScript. Here, an uploaded image file could contain a script, and a URL parameter was printed into the page without being made safe.

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 O iluminado_x86

View all

1 more disclosed report, 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.