Clipboard Paste UI Persistence Across Tab Creation Leads to User Confusion in firefox nightly android
A clipboard read prompt triggered by an attacker page stays visible after the browser navigates to a trusted site, so the user sees the prompt over the trusted domain. If the user taps Paste, the clipboard contents go to the original attacker page rather than the site shown in the address bar.
Originally disclosed on Mozilla
- Fixed in 16 days
- Paid in 32 days
- Disclosed after 16 days
Summary
I found that the issue reported in Mozilla Bugzilla issue 1918853 appears to still be reproducible in the latest Firefox Nightly for Android, which may indicate a regression or an incomplete fix. An attacker-controlled page can trigger a clipboard read request, then navigate the user to a trusted domain such as google.com. After the navigation completes, Firefox still displays the "Paste" clipboard prompt while the browser is showing the trusted domain.
If the user taps "Paste", the clipboard content is returned to the original attacker-controlled page rather than the currently displayed website. This creates a UI trust issue where users may believe they are interacting with the trusted domain shown in the address bar, while their clipboard data is actually being exposed to a different origin.
This behavior could be abused for clipboard theft, phishing scenarios, or other forms of UI spoofing where sensitive copied data is disclosed to an attacker without clear origin attribution.
Steps to Reproduce
- Open the following PoC: https://lowleveljody.github.io/pocbrowseraja/freak.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read Clipboard Text</title>
<script>
async function readClipboardText() {
try {
// Check if Clipboard API is supported
if (navigator.clipboard) {
// Read from clipboard
const text = await navigator.clipboard.readText();
alert('Clipboard text: ' + text);
} else {
console.error('Clipboard API not supported.');
}
} catch (err) {
console.error('Error reading from clipboard:', err);
}
}
function openGoogle() {
window.open('https://google.com', '_blank');
}
function requestPermissionsAndOpenGoogle() {
readClipboardText();
openGoogle();
}
</script>
</head>
<body>
<h1>Read Clipboard Text</h1>
<p>Click the button to read text from the clipboard</p>
<button onclick="requestPermissionsAndOpenGoogle()">Read Clipboard</button>
</body>
</html>
- Click the "Read Clipboard" button.
- The page automatically navigates to google.com.
- Observe that Firefox displays a "Paste" prompt after the trusted domain has already loaded.
- Tap **"Paste"`.
- Notice that the clipboard content is sent back to the original attacker-controlled page.
Tested Environment Mozilla Firefox Nightly for Android Version: 152.0a1
Impact
This issue can lead to origin confusion and unintended clipboard data disclosure. Because the clipboard prompt remains visible after navigation to a trusted domain such as google.com, users may reasonably believe the paste request is coming from the site currently shown in the address bar.
An attacker could abuse this behavior to trick users into pasting sensitive clipboard contents such as passwords, cryptocurrency wallet addresses, recovery codes, personal messages, or other confidential information. Since the clipboard data is ultimately delivered to the original attacker-controlled page rather than the trusted site being displayed, this creates a phishing and UI spoofing risk where sensitive information may be exposed without the user realizing they are interacting with a different origin.
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 clipboard permission prompt is not tied to the requesting page's lifetime, so it survives a navigation and its approval is still delivered to the original origin.
Impact
A user could be tricked into pasting sensitive clipboard contents such as passwords or recovery codes, which are then disclosed to the attacker's page, though the report only demonstrates this in Firefox Nightly for Android.
What the attacker needed
Firefox Nightly for Android; victim taps a button on attacker page; victim taps Paste on the prompt
How it was found
- Open the proof-of-concept page in Firefox Nightly for Android.
- Tap the button that reads the clipboard.
- The page opens google.com in a new tab.
- The Paste prompt appears after the trusted domain has loaded.
- Tap Paste.
- The clipboard text is returned to the original attacker page.
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 what you have copied, the browser asks you to confirm with a Paste button. Here the confirmation stayed on screen after the browser had already moved to a different, trusted-looking website. So a person could approve the paste thinking the trusted site asked for it, while the copied text actually went to the earlier page controlled by the attacker.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.