XSS by uploading/including a SWF file
A website that allows uploading or including a SWF file can be made vulnerable to cross-site scripting (XSS) because the Flash file can execute JavaScript in the context of the site. An attacker could use this to run arbitrary script in a victim's browser.
soroush.me
Published on soroush.me
As you may already know, it is possible to make a website vulnerable to XSS if you can upload/include a SWF file into that website. I am going to represent this SWF file that you can use in your PoCs.
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 site allows user-supplied SWF files to be served from its own origin, and Flash's ExternalInterface.call() can be abused to execute JavaScript in that origin.
Impact
An attacker could execute arbitrary JavaScript in the context of the vulnerable site, potentially stealing data or performing actions as the victim, though the text only demonstrates alerting the domain and notes browser-specific protections in Internet Explorer.
What the attacker needed
Ability to upload or include a SWF file; victim visits the SWF URL
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 an attacker gets their own JavaScript code to run on a website you visit, as if it were part of that site. Here, if a site lets people upload or include a Flash file (SWF), that file can contain code that runs JavaScript in the site's context. This means an attacker who can get such a file onto the site could run script in visitors' browsers.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.