Insufficient validation of untrusted input in UI (CVE-2026-17698)
Chrome for Android did not validate the scheme or location of file paths supplied through a global drag-and-drop from another app. A co-installed malicious app could drag a path pointing into Chrome's private profile directory onto an attacker-controlled page, which could then read and upload files such as the cookies database.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A potential vulnerability in Chrome for Android allows a co-installed application to exfiltrate files from Chrome's private profile directory via drag-and-drop. By initiating a global drag containing a null-scheme absolute POSIX path, a malicious app could bypass URI scheme validation. When dropped onto an attacker-controlled page, Chrome potentially grants the renderer process read access to the target file.
Affected files:
ui/android/java/src/org/chromium/ui/base/EventForwarder.javacontent/browser/android/drop_data_android.cccontent/browser/file_system/browser_file_system_helper.cc
Estimated timestamp from git blame: 2024-07-17
Description
There is a potential security vulnerability in Chrome for Android where a co-installed malicious application can leverage global drag-and-drop to exfiltrate Chrome's private application data (such as cookies, history, and logins).
When a drag-and-drop event is handled by Chrome, the Java layer extracts URI strings from the ClipData without validating their scheme or verifying whether the path points to Chrome's private data directory. On the native side, because the drop originated from outside the browser, standard security filters that block renderer-originated files are bypassed. Chrome then registers the absolute path in the isolated filesystem and grants the destination renderer read access to the specified file, allowing an attacker-controlled webpage to exfiltrate its contents.
Technical Analysis
-
Ingress and Parameter Extraction (Java): In
ui/android/java/src/org/chromium/ui/base/EventForwarder.javainsideonDragEvent, duringDragEvent.ACTION_DROP, the application iterates over the drop items and extracts their URIs:Java Uri uri = clipData.getItemAt(i).getUri(); if (uri != null) { String uriString = uri.toString(); String displayName = ContentUriUtils.maybeGetDisplayName(uriString); if (displayName == null) { displayName = new String(); } filenames.add(new String[] {uriString, displayName}); }At this stage, there is no validation to reject absolute paths or check if the target path resides under Chrome's private directory (e.g., via
PathUtils.isPathUnderAppDir()). -
Native Conversion: The filenames array is passed over JNI to the native side. In
content/browser/android/drop_data_android.cc,PopulateDropDataFromEventparses these JNI string arrays into nativebase::FilePathstructures insideDropData::filenames:C++ for (const auto& info : filenames) { CHECK_EQ(info.size(), 2u); drop_data->filenames.emplace_back(base::FilePath(info[0]), base::FilePath(info[1])); } -
Renderer Taint and Filter Bypass: Because the drag originates from an external Android application, the browser process hardcodes
drop_data_->did_originate_from_renderer = falseinsidecontent/browser/web_contents/web_contents_view_android.cc:C++ case DragEventJni::ACTION_DROP: { drop_data_ = std::make_unique<DropData>(); drop_data_->did_originate_from_renderer = false; ...Consequently, when
RenderWidgetHostImpl::FilterDropDatais called, the file list is spared from being cleared becausedid_originate_from_rendereris false. -
Capability and Read Privilege Grant: During drop processing,
RenderWidgetHostImpl::DragTargetDropinvokesPrepareDropDataForChildProcess, which routes toPrepareDataTransferFilenamesForChildProcessincontent/browser/file_system/browser_file_system_helper.cc. For each filename in the drop data, the browser process explicitly grants the target renderer process read capabilities for that path:C++ security_policy->GrantRequestOfSpecificFile(child_id, filename.path); if (!security_policy->CanReadFile(child_id, filename.path)) security_policy->GrantReadFile(child_id, filename.path);As a result, the destination renderer process is authorized to read the file, bypassing standard origin and sandbox access controls.
Potential Attack Steps
(Note: These are theoretical/potential steps; our security review tooling does not have the capability to run code or execute live tests on a device)
- A co-installed zero-permission application on the victim's Android device initiates a global drag with a null-scheme URI referencing a private Chrome file:
Uri.parse("/data/data/com.android.chrome/app_chrome/Default/Cookies") - The user is induced to perform a drag-and-drop gesture from the malicious app to a split-screen or multi-window instance of Chrome.
- The drop target is an attacker-controlled page containing a standard drag-and-drop event listener.
- Upon receiving the drop, the webpage uses the File API (
FileReader.readAsArrayBuffer()) to read and upload the cookies database to an external server.
Suggested Fix
Apply strict ingress validation inside the Android drag-and-drop handler to match the security controls used in other upload pathways (like SelectFileDialog.java).
Before passing filename URIs to JNI:
- Ensure that any received URIs have a valid and expected scheme (such as
content://orfile://). - Validate that the resolved file path does not point to Chrome's own private application directories by checking the path with
PathUtils.isPathUnderAppDir(path, context)and rejecting it if it returnstrue.
Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
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 the Android drag-and-drop handler accepted URI strings from external apps without checking the scheme or confirming the path was outside Chrome's private app directory, and the external origin also skipped the renderer-origin file filter.
Impact
A malicious co-installed app plus a user drag gesture could let an attacker page read Chrome's private files such as cookies, history and logins; the report notes the steps are theoretical and were not executed on a device.
What the attacker needed
Malicious app installed on the device; user drags item into Chrome; Chrome in split-screen or multi-window; attacker-controlled page as drop target
The fix
The drag-and-drop handler should reject URIs without an expected scheme and refuse any path that resolves inside Chrome's private app directory.
How it was found
- A co-installed app starts a global drag carrying a null-scheme path to a private Chrome file.
- The user drags the item from that app onto a multi-window or split-screen Chrome instance.
- The drop lands on an attacker-controlled page that listens for drag-and-drop events.
- The page reads the dropped file with the File API and uploads it to an external server.
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.
Android apps can share data by dragging items between them, and each dragged item carries a reference to a file. Chrome accepted these references without checking where they pointed, so a hostile app could hand Chrome a reference to Chrome's own private files. A web page controlled by the attacker could then read those files, which may hold cookies, history and saved logins.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.