Mozilla Firefox 88.0.1 – File Extension Execution of Arbitrary Code
A vulnerability has been identified in the way Mozilla Firefox handles downloaded files on Windows. Unlike the other most used browsers (Google Chrome, Internet Explorer, Edge), the action Mozilla Firefox takes is based on the 'Content-Type' attribute. It is possible to 'confuse' Firefox using a combination of 'Content-Type' attribute and file extension which leads to the arbitrary execution of code. Specifically, if a server responds with a 'Content-Type: text/html' and a filename that has the extension '.jpg', Mozilla Firefox will show the end user an 'open-with' mask, asking to open the jpg file with the default program (usually a browser), but will download the above mentioned file into the system's temporary folder using the extension '.html'. Subsequently, the downloaded file will be opened using the default program for .html files (browsers). It is easy to understand that it is possible to create a fake image, containing JavaScript code, which will lead to the execution of the code itself.