Skip to content
Business logic Disclosed report Intermediate

Hold Down Enter Key will Automatically Launch Downloaded Executable File

The download panel in Firefox gains focus after a download completes, so holding down the Enter key can automatically open the downloaded file. An attacker could serve a malicious executable and trick a user into holding Enter, causing the executable to launch.

Irvan Kurniawan Follow

Originally disclosed on Mozilla

  • Fixed in 41 days
  • Paid in 39 days
  • Disclosed after 41 days

Created attachment 9252718 testcase.html

I noticed in the newer download panel once the download is complete the download panel will get focus. Interestingly when holding down enter key the downloaded file will be automatically opened.

Attacker can abuse this by serving malicious executable, once user hold down the enter key, the malicious executable will be launched. On Linux OS the .exe file will be launched on Wine installed system.

On older version of Firefox the "OK" button is disabled while holding down enter key. On Chrome browser holding down "Enter" key will not launch the executable.

Steps to Reproduce:

  1. Visit attached testcase.htnl
  2. Hold down the "Enter" key
  3. Command prompt (cmd.exe) will be launched

The original report as published on Mozilla's Bugzilla, by Irvan Kurniawan. 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 panel automatically receives keyboard focus when a download completes, and the Enter key activates the default action (opening the file) without requiring an explicit click.

Impact

An attacker could cause a downloaded executable to run automatically if the user holds down the Enter key, potentially leading to code execution on the user's system.

What the attacker needed

User downloads a malicious executable; user holds down the Enter key

How it was found

  1. Visit the provided test case page.
  2. Hold down the Enter key.
  3. The command prompt (cmd.exe) is launched.

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 in a browser, a small panel appears showing the download. In this case, that panel automatically takes keyboard focus, so any key you are already holding down (like Enter) gets sent to it. If the file is a program, pressing Enter on it can run it, which is dangerous if the file is malicious.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by Irvan Kurniawan

View all

72 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.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.