No clickjacking delay for the Directory Upload prompt
The directory upload prompt in Firefox lacks the clickjacking delay that other UI prompts have. An attacker could trick a user into repeatedly clicking a button, causing them to unknowingly upload their entire directory to the attacker's site.
Originally disclosed on Mozilla
- Fixed in 15 days
- Paid in 27 days
- Disclosed after 15 days
Created attachment 9422495
poc.html
Firefox has implemented delays to counter clickjacking attacks on various UI prompts. However, during testing, the directory upload prompt does not include this delay. An attacker could create an engaging website that involves a clicking game, where the user repeatedly clicks in the same location. This could trigger two prompts: one for the OS's directory upload (where the "Upload" button is preselected and active) and another Firefox prompt. Without a delay in the browser's prompt, the user could unknowingly upload all their files to the attacker's site. See demo.
I demonstrated this on a macOS machine, though the same prompt on Windows also lacks this security measure. While the Windows file chooser may appear in different areas depending on user last placement, the macOS prompt consistently opens in a predictable center location every time.
Steps to reproduce:
1. Download the attached `poc.html` and `popup.html` files.
2. Open the `poc.html` file in the latest macOS Firefox browser.
3. Click on 'Play Game' and repeatedly click on the red button to see that the user's directory is unknowingly uploaded.
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 directory upload prompt was not included in the clickjacking delay mechanism applied to other Firefox UI prompts.
Impact
A user could unknowingly upload their entire directory to an attacker's site, but the attack requires the user to repeatedly click in the same location and the prompt may appear in different areas on Windows.
What the attacker needed
Victim uses Firefox on macOS or Windows; victim visits attacker's website; victim repeatedly clicks a button
How it was found
- Download the attached poc.html and popup.html files.
- Open the poc.html file in the latest macOS Firefox browser.
- Click on 'Play Game' and repeatedly click on the red button to see that the user's directory is unknowingly uploaded.
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.
Clickjacking is when a malicious site tricks you into clicking something you didn't intend to, often by hiding or disguising buttons. Here, Firefox normally waits a moment before allowing clicks on security prompts to prevent this, but the directory upload prompt doesn't have that delay. So a game that makes you click rapidly could cause you to accidentally approve uploading all your files.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.