Insufficient validation of untrusted input in Clipboard (CVE-2026-17766)
Chrome for Android's clipboard handling opens content:// URIs from the system clipboard without validating their origin, so a malicious zero-permission app can place a URI to a sensitive file and have Chrome read it when the user pastes into an attacker-controlled page. The page can then exfiltrate the file contents.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A potential Confused Deputy vulnerability exists in Chrome for Android where ClipboardImpl.getPng() blindly opens content:// URIs retrieved from the system clipboard. A malicious zero-permission app could place a URI pointing to a sensitive file on the clipboard, causing Chrome to read and disclose it to an attacker-controlled website during a paste action.
Affected files:
ui/android/java/src/org/chromium/ui/base/ClipboardImpl.java
Estimated timestamp from git blame: 2022-02-22
Summary
A potential Confused Deputy vulnerability exists in Chrome for Android's clipboard handling. Specifically, ClipboardImpl.getPng() retrieves content:// URIs from the system clipboard and opens them using Chrome's ContentResolver without validating the URI's origin or destination. This could allow a zero-permission malicious app to trick Chrome into reading sensitive local files (e.g., photos from MediaStore, assuming Chrome holds storage permissions) and disclosing their contents to a web page upon a user's paste action.
Technical Details
When a web page requests image data from the clipboard (e.g., via event.clipboardData.items[i].getAsFile() during a paste event), the renderer process makes a synchronous Mojo call to the browser process to fetch the data. On Android, this eventually delegates to ui/android/java/src/org/chromium/ui/base/ClipboardImpl.java.
The implementation of getPng() performs the following steps:
- It calls
getImageUri(), which retrieves a URI from the Android system'sClipboardManager. - It calls
ContentResolver.getType(uri)to determine the MIME type. On Android, this typically relies on the file extension rather than content inspection. - If the MIME type is
image/png, it directly callsContentResolver.openAssetFileDescriptor(uri, "r")to read the raw bytes.
The vulnerability is that Chrome does not verify if the URI is safe to open. It blindly passes the attacker-provided URI to ContentResolver. A malicious application can set the system clipboard to a URI such as content://media/external/images/media/1.png. When the user pastes into an attacker-controlled web page, Chrome reads the file using its own potentially elevated permissions and returns the raw data to the renderer, allowing the page to exfiltrate it.
Impact Constraints:
- The attack requires a malicious local application to poison the system clipboard.
- The attack requires a user-initiated paste gesture on an attacker-controlled web page.
- The target file must be accessible via a
content://URI and generally requires an extension that resolves to animage/*MIME type (e.g.,.png) to bypass transcoding checks.
Potential Reproduction Steps
Note: These are suggested steps; our tooling agent cannot execute code to verify a working proof of concept.
- Install a malicious zero-permission app that sets the system clipboard to a
ClipDatacontaining a URI pointing to a sensitive file accessible by Chrome (e.g., a photo in the MediaStore). - In Chrome, navigate to a website controlled by the attacker that listens for the
pasteevent. - The user is tricked into performing a paste gesture on the page.
- The website's JavaScript reads the file from
event.clipboardData.itemsand exfiltrates it.
Recommended Fix
Implement a validation check in ClipboardImpl.getPng() and/or getImageUri() to ensure that clipboard URIs do not point to sensitive local data before attempting to open them. Chrome should perhaps only accept URIs that it placed on the clipboard itself, or restrict reading to a safe subset of authorities.
Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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, ClipboardImpl.getPng() passes an attacker-controlled content:// URI from the clipboard directly to ContentResolver.openAssetFileDescriptor() without validating its origin or destination.
Impact
A malicious local app could cause Chrome to read sensitive local files and disclose their contents to an attacker-controlled web page, but only if the user performs a paste gesture and the file has an image MIME type.
What the attacker needed
Malicious zero-permission app installed; user performs paste gesture; attacker-controlled web page; target file accessible via content:// URI
The fix
Chrome should validate clipboard URIs in ClipboardImpl.getPng() and/or getImageUri() to ensure they do not point to sensitive local data, perhaps only accepting URIs that Chrome itself placed on the clipboard or restricting reading to a safe subset of authorities.
How it was found
- Install a malicious zero-permission app that sets the system clipboard to a URI pointing to a sensitive file accessible by Chrome.
- In Chrome, navigate to an attacker-controlled website that listens for the paste event.
- Trick the user into performing a paste gesture on the page.
- The website's JavaScript reads the file from the clipboard data and exfiltrates it.
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.
On Android, apps can share files by passing around special links called content:// URIs. Chrome for Android trusts any such link it finds on the clipboard and opens it using its own permissions, so a malicious app can trick Chrome into reading a private file and handing it to a website when you paste. The report suggests Chrome should check where the link came from before opening it.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.