Clipboard "paste" button persists across a tab open
A clipboard paste prompt triggered by a script on one domain persisted after a new tab opened to a different domain, so the prompt appeared to come from the trusted site. If the user clicked Paste, the clipboard content was sent to the original script on the unrelated domain.
- Fixed in 6 days
- Paid in 10 days
- Disclosed after 6 days
Created attachment 9424820
repro_clipboard.webm
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:
1. Open : https://roomkangali.com/browser/0xClip/
2. Click button Read Clipboard
3. Observe that after the google.com page loads, an alert appears asking for "Paste" from the clipboard.
4. 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.
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 browser did not tie the pending clipboard-read permission prompt to the tab and origin that requested it, so it survived a new tab opening another site.
Impact
A user could be misled into pasting clipboard contents into a prompt that appears to belong to a trusted site, sending that data to an unrelated domain; the report does not show this working beyond the described test.
What the attacker needed
Victim visits attacker page; victim clicks Read Clipboard; victim clicks Paste on the prompt
The fix
The browser should bind clipboard permission prompts to the tab and origin that requested them and dismiss them when a different page is shown.
How it was found
- Open the test page that hosts the clipboard script.
- Click the button that requests to read the clipboard.
- The script opens google.com in a new tab and a Paste prompt appears there.
- Click Paste and observe the clipboard content is sent to the script on the other domain.
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 a website wants to read your clipboard, the browser shows a Paste button so you can agree. Here, that button stayed on screen even after a new tab opened a different website, so it looked like the trusted site was asking. Clicking it sent your copied text to the first website instead.
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.