Closed Bug 1976296 (CVE-2025-55032) Opened 1 year ago Closed 1 year ago

Focus ignores `Content-disposition: attachment` and binary content-types that should be downloaded, creates XSS on sites allowing user uploads

Categories

(Focus :: Security: iOS, defect)

defect

Tracking

(fxios142)

VERIFIED FIXED
Tracking Status
fxios 142 ---

People

(Reporter: renwax23, Unassigned)

References

Details

(Keywords: csectype-sop, reporter-external, sec-high, Whiteboard: [client-bounty-form])

Attachments

(3 files)

Attached file file.exe.download.php —

Firefox Focus ignores both Content-Type: application/octet-stream and Content-Disposition headers which means any downloadable file with any MIME or extension is getting rendered inside the browser instead of a download, this will lead to XSS attacks in all of the sites that allows file uploads.

POC: (Using Google Drive to upload a file and getting an XSS on *.google.com)
https://drive.usercontent.google.com/u/0/uc?id=1MC2X5-GRa741N6V160rbpMv2DyfBHaY_&export=download

Video POC: (Showing the file is getting downloaded in Firefox but rendered in Focus)
https://drive.google.com/file/d/1cF40oMr6foTYJ2uGnzLOlPTxqUKSqnkC/view?usp=sharing

Test case attached as a file

Flags: sec-bounty?
Group: firefox-core-security → mobile-core-security
Component: Security → Security: iOS
Product: Firefox → Focus

Can't add content-disposition: headers with bugzilla attachments, but let's try the binary content-type anyway.

Attachment #9499616 - Attachment mime type: text/plain → application/octet-stream
Summary: Firefox Focus iOS File Download Ignored Leading to UXSS Attacks → Focus ignores `Content-disposition: attachment` and binary content-types that should be downloaded, creates XSS on sites allowing user uploads

This makes me worry we're doing MIME sniffing. Do we ignore X-Content-Type-Options: nosniff headers also?

What about the download attribute on links? (that may or may not be handled by the Web View)

See Also: → CVE-2025-55030

A few notes based on discussions with the sec team:

  • Currently in Focus content with content-disposition:attachment is displayed inline, regardless of MIME type
  • Unlike Firefox, our Focus browser does not have a downloads manager or file download support
  • Because of this, we can't simply download files with the attachment header, that content needs to be blocked entirely to avoid potential XSS issues
  • This will essentially break certain types of content or links in Focus (some download links or buttons will fail to load entirely), but unfortunately there is not a great interim solution unless we're willing to bring Firefox's download support over to Focus which probably is out of scope for this fix

I've reached out to the iOS team to discuss further. There is an initial PR up for now which checks for the attachment header in Focus and blocks navigation to that content, per the above.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Group: mobile-core-security → core-security-release

Quick note: there are two different PRs for this ticket with nearly-identical URLs, wanted to add a comment just to avoid any potential confusion.

https://github.com/mozilla-mobile/firefox-ios/pull/28017
https://github.com/mozilla-mobile/firefox-ios/pull/28071

Flags: sec-bounty? → sec-bounty+

Verified as fixed on v9000 (59112 ) with iPhone 15 Pro (18.5).
The file did fail to load, as this is the expected and necessary behavior.
video

Status: RESOLVED → VERIFIED
Attached file advisory.txt —
Alias: CVE-2025-55032

Verified as fixed on v142 (59358) with iPhone 15 Pro (18.5).
video

Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: