XSS at http://vk.com on IE using flash files
A Flash file hosted on vk.com could be abused to execute JavaScript in Internet Explorer by passing a crafted fragment that the Flash file wrote into the page. An attacker could run script in the vk.com origin when a victim opened a link and hovered over the page.
Originally disclosed on HackerOne
- Triaged in 36 days
- Fixed in 4 months
- Paid in 4 months
- Disclosed after 5 months
Summary by the researcher
Flash XSS at vk.com only on Internet Explorer after bypassing few restrictions. More info is available at http://blog.tunnelshade.in/2015/09/interesting-flash-xss-on-vkcom.html
The report
Steps
- Open the below url in Internet Explorer
http://vk.com/swf/photo_uploader_lite.swf?h=h?&onMouseOver=document.write(window.location.hash.substr(1))#<script>alert(document.domain)</script>
- Just hover your mouse over the page.
Minor Observations
- No "X-Content-Type-Options: nosniff" header allows IE to play the flash file directly whereas other browsers present download dialog as the content type served is application/zip.
- No X-Frame options will allow this attack to be placed inside an iframe and run stealthily.
- Other flash files such as http://vk.com/swf/CaptureImg.swf will also be vulnerable in a similar fashion.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Flash file passed a URL fragment value into a JavaScript sink (document.write) without sanitisation, and the server served the file with a content type that Internet Explorer still executed as Flash.
Impact
An attacker could execute script in the vk.com origin in Internet Explorer, but only if the victim used that browser and interacted with the page; other browsers showed a download dialog instead.
What the attacker needed
Victim uses Internet Explorer; victim opens a crafted link; victim hovers over the page
How it was found
- Open the crafted URL in Internet Explorer.
- Hover the mouse over the page to trigger the Flash handler.
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 report has not been written yet. The Original tab links to the source.
Flash was a browser plugin that could run small programs inside a web page. Here, one of those programs took text from the address bar and wrote it into the page without cleaning it, so a crafted link could make the browser run attacker-supplied JavaScript as if it came from vk.com. This only worked in Internet Explorer because other browsers downloaded the file instead of running it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.