Skip to content
Info disclosure Disclosed report Beginner

super-long filenames can hide the file extension on the download confirmation prompt

Firefox's download confirmation prompt truncates very long filenames, hiding the file extension. An attacker could use this to disguise a malicious file as a legitimate one, tricking users into downloading it.

Barath Stalin K Follow

Originally disclosed on Mozilla

  • Paid in 2 months
  • Disclosed after under an hour
Text
Created attachment 9466494
firefox extension spoof.jpg

Vulnerability Description:
When a user downloads a file with a very long name in the browser, the file extension is not displayed. Instead, a prompt appears asking the user to download the file, only showing the prefix of the file name. This can result in legitimate users unknowingly downloading malicious files due to this vulnerability.


Steps-To-Reproduce:
1. Create a test file with a long name, then upload it to any cloud storage or host it on your server.(i.e Used google drive to upload a test image file with very long name aprox 5k-10k Characters)
2. Generate a link for the file and open the URL in your browser.
3. The browser will prompt you with the prefix of the filename, excluding the extension.

Impact:
The impact of this issue is significant, as it exposes users to the risk of downloading malicious files without being aware of their true nature. Since the file extension is concealed, attackers can disguise harmful software as seemingly legitimate files, bypassing basic security checks. This opens the door for malware, ransomware, and other malicious programs to be inadvertently executed on users' systems, leading to potential data breaches, loss of sensitive information, or even complete system compromise.If users are harmed by this exploit, it can severely damage trust in the platform or service, leading to reputational harm and a decline in user confidence.

Fix:
To fix this issue, ensure that the full file name, including its extension, is always displayed in the browser download prompt. Implement proper validation and sanitization of file names to prevent the concealment of extensions

The original report as published on Mozilla's Bugzilla, by Barath Stalin K. 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 download prompt truncates long filenames without preserving or separately showing the file extension.

Impact

Users could unknowingly download malicious files because the true extension is hidden, potentially leading to malware execution and system compromise.

What the attacker needed

Victim opens a download link; file has an extremely long name

The fix

The browser should always display the full filename, including the extension, in the download prompt and validate filenames to prevent extension concealment.

How it was found

  1. Create a test file with a very long name (around 5,000 to 10,000 characters).
  2. Upload it to cloud storage or host it on a server.
  3. Generate a link to the file and open it in the browser.
  4. Observe that the download prompt shows only the filename prefix, without the extension.

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 you download a file, the browser usually shows its name and type (like .jpg or .exe) so you know what you are getting. Here, if the name is extremely long, the browser only shows the beginning and cuts off the end, so you cannot see the real file type. A bad person could give a harmful file a very long name to hide that it is dangerous.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Barath Stalin K

View all

5 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.