Skip to content
XSS Write-up Beginner

XSS through SWF file

An attacker could upload a malicious SWF file to a server, and then trigger cross-site scripting by appending a JavaScript payload to the file's URL. This allowed execution of arbitrary JavaScript in the context of the vulnerable site.

Friendly Follow

Published on medium.com

Bounty$200 View original

First off, I’d like to say thank you to everyone who’s followed and helped me learn different target points and attacks for web testing.

Friendly, 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 server allowed uploading of SWF files and served them without proper content-type or security restrictions, enabling Flash-based XSS.

Impact

An attacker could execute arbitrary JavaScript in the context of the vulnerable website, potentially stealing cookies or performing actions on behalf of users.

What the attacker needed

Ability to upload SWF files; victim visits crafted URL

How it was found

  1. Obtain an XSS SWF file.
  2. Upload the SWF file to the server being tested.
  3. Verify the file is hosted and accessible.
  4. Append a JavaScript payload to the SWF URL to trigger XSS.

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 people upload a Flash file (SWF) and then served it back. Flash files can run JavaScript if you add a special parameter to their URL. By uploading a file that runs JavaScript and then visiting it with that parameter, an attacker could make the site run their code.

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 Friendly

View all

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