Clipboard "paste" button persists across a tab open
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: alisyarief.404, Assigned: tschuster)
References
(Regression)
Details
(4 keywords, Whiteboard: [client-bounty-form] [adv-main132+] [adv-esr128.4+])
Attachments
(6 files, 1 obsolete file)
When an HTML script is executed to open google.com, an alert appears asking the user to "Paste" clipboard content. If the user selects "Paste," the clipboard content is sent to the HTML script, which is located on a different domain. This raises potential concerns of UI spoofing and clipboard hijacking, as the prompt or notification for clipboard actions appears to come from a trusted domain like google.com, but is actually from a different domain.
This vulnerability could lead to UI spoofing and clipboard hijacking, where users may not realize that the notification originates from an unrelated source and their clipboard data could be sent to unauthorized parties.
Steps to Reproduce:
- Open : https://roomkangali.com/browser/0xClip/
- Click button Read Clipboard
- Observe that after the google.com page loads, an alert appears asking for "Paste" from the clipboard.
- Click "Paste" on the alert and check that the clipboard content is sent to the HTML script on a different domain.
Test in :
Firefox Nightly : 131.0a1 (2024-08-26) (64-bit)
OS : Ubuntu
Expected Result: Clipboard-related prompts or interactions should not appear on a domain different from the one that triggered the action. Clipboard actions should be performed transparently and should not mislead the user.
Actual Result: The "Paste" alert appears on the google.com page, and if the user selects "Paste," the clipboard content is sent to the HTML script located on a different domain. This can mislead users and open potential risks of data theft or misuse of personal information.
Testing Browser Android work
Nightly Android : 132.0a1 (Build #2016044015)
Firefox Android : 130.0 (Build #2016041319)
OS : Android 14
Comment 2•1 year ago
|
||
Please attach a test case to this bug to aid triage. Thanks.
Comment 3•1 year ago
|
||
I was able to reproduce this issue on MacOS.
this attachment script html
i test reproduce in windows and mac is work
Comment 5•1 year ago
|
||
Updated•1 year ago
|
Comment 6•1 year ago
|
||
Tom noted this was an issue in bug 1916831 comment 2
Comment 7•1 year ago
|
||
Hsin-Yi, who is working on async clipboard stuff while Edgar is out? Thanks.
Updated•1 year ago
|
Comment 8•1 year ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #7)
Hsin-Yi, who is working on async clipboard stuff while Edgar is out? Thanks.
:tschuster is the person that I immediately think about; however, I am not quite sure about Tom's recent bandwidth.
Hi Tom, would you be able to put up patches for this? I read that there's a solution per bug 1916831 comment 2. Thank you.
| Assignee | ||
Comment 9•1 year ago
|
||
I think I already found this issue and it's not directly bug 1916831 comment 2. The problem is that just like with the select dropdown (bug 1909163), we didn't mark the "Paste" context menu as "tabspecific". Thus it doesn't close when the current tab/location changes.
| Assignee | ||
Comment 10•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 11•1 year ago
|
||
That's not to say that we shouldn't also check the active flag at some earlier point, but in my quick testing browsingContext.isActive was true during confirmUserPaste.
This does not resolve the Firefox for Android issue, and I don't have any experience with that.
| Assignee | ||
Updated•1 year ago
|
Comment 12•1 year ago
|
||
(In reply to Tom Schuster (MoCo) from comment #11)
This does not resolve the Firefox for Android issue, and I don't have any experience with that.
Thank you for working on this. If this requires separate Fenix changes to fix the same test case, could you please file a new issue for that so we don't lose track of this? Thanks.
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Comment 13•1 year ago
|
||
Comment 14•1 year ago
|
||
Set release status flags based on info from the regressing bug 1877400
| Assignee | ||
Comment 15•1 year ago
|
||
That patch should apply cleanly to ESR128.
| Assignee | ||
Comment 16•1 year ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D222596
Updated•1 year ago
|
| Assignee | ||
Comment 17•1 year ago
|
||
Comment on attachment 9426087 [details]
Bug 1918853 - Mark the Paste contextmenu as tabspecific. r?emilio
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: It might be possible to trick users into leaking their clipboard contents, because the [Paste] button appears on a page they trust.
A simple fix.
- User impact if declined: Users may accidentally expose their own private data.
- Fix Landed on Version: 132
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): One line change, that follows other similar fixes for cross-tab spoofing with dropdowns/menus.
Comment 18•1 year ago
|
||
Updated•1 year ago
|
| Reporter | ||
Comment 19•1 year ago
|
||
yes im testing in Desktop Firefox Nightly : Version 132.0a1 (2024-09-20) (64-bit)
this patch fix
just waiting fix Firefox Nightly on android
Thanks
Updated•1 year ago
|
| Reporter | ||
Comment 20•1 year ago
|
||
Thank you for the reward and respect to the team for the fix, great work! 🙂
I have a questions, how long is the CVE release and payment ?
Are the planning CVE , if yes could you save credits as
Reporter credit: Kang Ali and Nur Fadhillah of Punggawa Cybersecurity
Thanks
Comment 21•1 year ago
|
||
Questions about the bug bounty program should be directed to security@mozilla.org and not put in bugzilla comments.
(This is however an appropriate place to specify the reporter credit.)
| Reporter | ||
Comment 22•1 year ago
|
||
oke thanks Andrew
Do I have to contact security@mozilla.org or will security@mozilla.org contact me later?
(This is however an appropriate place to specify the reporter credit.)
how long is the CVE release ?
Thanks
Updated•1 year ago
|
Comment 23•1 year ago
|
||
| uplift | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 24•1 year ago
|
||
Reproduced the initial issue using an old Nightly build from 2024-08-26, verified that using latest Firefox Beta 132.0b7 and latest 128ESR build across platforms (Windows 11, macOS 13 and Ubuntu 22.04) from treeherder the issues is no longer reproducible. The paste clipboard button does not appear anymore so the clipboard is not leaked anymore in the demo page.
Updated•1 year ago
|
Comment 25•1 year ago
|
||
Updated•1 year ago
|
Updated•10 months ago
|
Description
•