Skip to content
XSS Write-up Beginner

$500 Bounty for Stored SVG-based Script Execution Vulnerability in target.com’s Chat System

Uploaded SVG files were stored and served without sanitisation, so any embedded JavaScript ran when the file was opened in a browser. An attacker could upload a malicious SVG and share its link to execute script in the context of the asset domain.

ch1ta Follow

Published on ch1ta.medium.com

While exploring file upload functionalities at Target.com, I uncovered a high-severity vulnerability that allowed stored JavaScript execution via SVG files. This bug was responsibly disclosed through their security program, and I was awarded $500 for the report.

Lakshya, on ch1ta.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 pipeline accepted SVG files and served them with a content type that lets browsers execute embedded scripts, without sanitising or converting the files.

Impact

An attacker could upload a malicious SVG and share its link to run script in victims' browsers, potentially stealing data or session tokens if cookies were shared, and the file would stay hosted until removed.

What the attacker needed

Ability to upload files; victim opens the asset URL

The fix

The issue was addressed by sanitising or converting uploaded assets and isolating them on a separate domain with strict headers.

How it was found

  1. Upload a test SVG file containing a script tag that shows an alert.
  2. The file is accepted and stored with a signed public URL.
  3. Open the URL in a browser 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.

An SVG is an image format that can also contain code. The site let people upload SVGs and then served them back unchanged, so the code inside ran in the visitor's browser. This is called stored cross-site scripting because the harmful file is saved on the server and affects anyone who opens it.

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 ch1ta

View all

4 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.