Closed Bug 411077 Opened 13 years ago Closed 13 years ago
File upload input focus stealing: by setting font size larger than page, any user mouse click will set focus in file element
1.18 KB, text/html
169.37 KB, application/java-archive
169.50 KB, application/java-archive
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:18.104.22.168) Gecko/20071127 Firefox/22.214.171.124 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:126.96.36.199) Gecko/20071127 Firefox/188.8.131.52 By setting the font size of the file input element larger than the page, the text entry portion will cover the entire visible page. Any user mouse click on the page will set the focus in the file input text entry field. Once the focus is set on the file element, any entered keystrokes can be selectively captured and potentially used to upload arbitrary files from the user. Reproducible: Always Tested with user agents: - Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:184.108.40.206) Gecko/20071127 Firefox/220.127.116.11 - Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:18.104.22.168) Gecko/20071127 Firefox/22.214.171.124 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20071127 Firefox/188.8.131.52 - Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:184.108.40.206pre) Gecko/20080106 BonEcho/220.127.116.11pre - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168pre) Gecko/20080106 BonEcho/22.214.171.124pre
Clicking anywhere in the example set the focus in the file input text field.
Assignee: nobody → dveditz
Product: Firefox → Core
QA Contact: firefox → toolkit
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #295720 - Attachment mime type: application/zip → application/java-archive
Assignee: dveditz → Olli.Pettay
Flags: blocking1.9? → wanted1.8.1.x+
Version: unspecified → 1.8 Branch
The fix in bug 413135 makes this attack ineffective on branch; trunk not affected.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated the example attack to use the disabled property to selectively cancel keystrokes. This bypasses the fix for bug 413135 in attachment 298006 [details] [diff] [review].
I have verified that with Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:126.96.36.199) Gecko/2008012822 Firefox/188.8.131.52, the updated attack from Gregory still exploits the browser. I did note that if I tabbed around the fields, the exploit, as written here, doesn't seem to capture input and you never get the alert.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
My bad. The test cause is counterintuitive. Olli and I just conferred and this is fixed. Re-resolving and verifying.
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.