Skip to content
XSS Disclosed report Intermediate CVE-2025-6430

Ignoring of a Content-Disposition: attachments header leads to XSS flaws

Firefox ignores the Content-Disposition: attachment header when a file is loaded via <embed> or <object>, so an uploaded HTML/XML/SVG file is rendered instead of downloaded. An attacker could upload a malicious file and have it execute script in the context of the hosting site.

Zeroday Follow

Originally disclosed on Mozilla

  • Fixed in 2 days
  • Paid in 16 days
  • Disclosed after 2 days
Text
Steps to reproduce:

Description:
Product: FireFox
Version: 139.0.1
Researcher: Daniil Satyaev (Positive Technologies)

Research:
1. Upload html/xml/svg file on website.
2. Return it as downloadable file 
'''
Content-Type: text/html
Content-Disposition: attachment; filename=test

<script>alert(1)</script>
'''
3. Open it from another page using <object> or <embed> HTML tags.
'''
<embed src=”CD_header_ignored_here”/>
<object data=”CD_header_ignored_here”></object>
'''


Actual results:

Websites often allow users to upload their own content and return it as a downloadable file using the HTTP header Content-Disposition: attachment. Its i well known feature to avoid XSS. I've found that if a page is opened using <embed> or <object>, the Content-Disposition header is ignored, and the files are displayed instead of being downloaded.


Expected results:

Browser will download files. Latest Content-Disposition: attachment XSS issue was widely used with Safari on iOS. This issue patched more then 7 years ago.

The original report as published on Mozilla's Bugzilla, by Zeroday. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 browser does not apply the Content-Disposition: attachment header when a resource is loaded as a sub-document via <embed> or <object>.

Impact

An attacker could execute script in the context of the hosting site, potentially leading to cross-site scripting, though the report does not demonstrate a full exploit chain.

What the attacker needed

Ability to upload HTML/XML/SVG files; victim opens a page with <embed> or <object>; Firefox browser

The fix

The browser should honour the Content-Disposition: attachment header and download the file even when it is referenced by <embed> or <object>.

How it was found

  1. Upload an HTML, XML, or SVG file to a website.
  2. Have the site return the file with Content-Type: text/html and Content-Disposition: attachment.
  3. Open the file from another page using an <embed> or <object> tag.
  4. Observe that the file is displayed and its script runs instead of being downloaded.

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 lets people upload files, it often tells the browser to download them rather than display them, using a special instruction called a header. This report found that Firefox ignores that instruction if the file is shown inside another page using certain HTML tags, so the file's code can run. That could let an attacker run their own script on the website.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.