Firefox iOS Ignores Content-Disposition Header allows XSS
Firefox for iOS ignores the Content-Disposition response header and renders files inline instead of downloading them. An attacker could use this to serve a file that executes script in the browser context, leading to cross-site scripting.
Originally disclosed on Mozilla
- Fixed in 6 days
- Paid in 8 days
- Disclosed after 6 days
Created attachment 9499293
firefox-ios-download-render.mp4
Firefox for iOS ignores `Content-Disposition` response headers and instead of downloading the file it will render it, this is different from `1976296` because Focus ignores `Content-Type` too but Firefox if it's `application/octet-stream` it will try to download it.
POC: https://rx23.io/poc/firefox/2.php
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
Impact
An attacker could cause script in a served file to run in the context of the affected site, though the report only demonstrates rendering and does not show a full exploit.
What the attacker needed
Firefox for iOS; victim opens a crafted link
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.
When a website sends a file, it can include a header telling the browser to download it rather than display it. Firefox on iPhone ignores that instruction and shows the file in the browser instead. If the file is a web page with script, that script can run as if it came from the site, which is called cross-site scripting.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.