Insufficient validation of untrusted input in Drag and Drop (CVE-2026-11029)
Chrome's Android drag-and-drop code fails to sanitise a filename extension supplied by a compromised renderer, allowing path traversal sequences to reach the display name exposed to a drop-target app. If that app naively uses the display name to save the file, an attacker could write arbitrary files in the app's private directory, potentially escaping the sandbox.
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.
Overview: A compromised renderer can supply a malicious filename_extension containing path traversal characters during a drag-and-drop operation. Chrome's Android implementation fails to sanitize this extension in its fallback logic, exposing it to drop-target applications. This could allow a sandbox escape by writing arbitrary files to a vulnerable third-party app.
Affected files:
content/browser/android/drop_data_android.cccontent/browser/renderer_host/render_widget_host_impl.ccui/android/java/src/org/chromium/ui/dragdrop/DropDataProviderImpl.javacontent/browser/renderer_host/data_transfer_util.ccui/android/java/src/org/chromium/ui/dragdrop/DropDataProviderUtils.javamojo/public/cpp/base/file_path_mojom_traits.cc
Estimated timestamp from git blame: 2022-06-21
Overview
There is a potential path traversal vulnerability in Chrome's Android drag-and-drop implementation (DropDataProvider). A compromised renderer can control the filename_extension field of a dragged image. By injecting path traversal sequences (e.g., ../../../), an attacker can control the OpenableColumns.DISPLAY_NAME exposed to a target application. If the target application naively uses this display name to save the dropped file, it can lead to an arbitrary file write within the target application's private data directory, effectively acting as a sandbox escape.
Note: This is a potential vulnerability identified via static code analysis. Our tooling agent does not yet have the ability to run code to produce a live proof-of-concept.
Vulnerability Details
- Mojo IPC: A compromised renderer can construct a
blink.mojom.DragItemBinarystruct and set thefilename_extensionfield to a path traversal string (e.g.,png/../../../../data/data/com.victim/files/payload). - Missing Validation: In the browser process,
RenderWidgetHostImpl::StartDraggingconverts this IPC data into aDropDataobject. Security checks are applied to file paths, but thefile_contents_filename_extensionfield is not sanitized because it is assumed to be a short, benign extension. - Unsanitized Fallback in Android JNI: In
content/browser/android/drop_data_android.cc, the browser attempts to generate a safe filename usingGetSafeFilenameForImageFileContents(). Because the malicious extension is not a recognized MIME type, this fails. The code then relies on fallback logic that blindly concatenates the extension to a timestamp:base::NumberToString(...) + "." + drop_data.file_contents_filename_extension - Confused Deputy: This tainted string is passed to the Android Java layer and cached in
DropDataProviderImpl. When a target application receives the drop and queries theContentProviderURI for file metadata, Chrome returns the tainted string asOpenableColumns.DISPLAY_NAME.
Potential Attack Steps
- An attacker compromises a Chrome renderer process (e.g., via a v8 exploit).
- The attacker triggers a
LocalFrameHost::StartDraggingIPC, embedding aDragItemBinarypayload with a maliciousfilename_extension(e.g.,png/../../../../data/data/com.victim/files/libmalicious.so) and custom file bytes. - The attacker tricks the user into dragging the malicious element from Chrome into a vulnerable target application (e.g., in split-screen mode).
- The target application resolves the dropped
ContentProviderURI, queries theDISPLAY_NAME, and receives the traversal string. - If the target app uses this
DISPLAY_NAMEto construct a file path (e.g.,new File(targetDir, displayName)), the payload is written outside the intended directory, overwriting sensitive files or native libraries to achieve code execution in the victim app.
Suggested Fix
The browser process must aggressively sanitize the file_contents_filename_extension before using it or passing it to the OS.
- In
content/browser/android/drop_data_android.cc(or earlier inDragDataToDropData), ensure that any path separators (/,\) or directory traversal sequences (..) are stripped from the extension. - A simple fix in
ToJavaDropDatacould be utilizingbase::FilePath(drop_data.file_contents_filename_extension).BaseName().value()or explicitly checking that the extension only contains alphanumeric characters.
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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
The browser process did not sanitise the filename_extension field from the renderer before concatenating it into a fallback display name, assuming it was a short benign extension.
Impact
A compromised renderer could potentially escape the sandbox by writing arbitrary files to a vulnerable third-party app's private data directory, but this requires the target app to naively use the display name and the report notes no live proof-of-concept was produced.
What the attacker needed
Compromised Chrome renderer; victim drags element to target app; target app naively uses display name
The fix
The browser process should strip path separators and directory traversal sequences from the extension, or restrict it to alphanumeric characters, before using it or passing it to the OS.
How it was found
- Compromise a Chrome renderer process.
- Trigger a StartDragging IPC with a DragItemBinary payload containing a malicious filename_extension and custom file bytes.
- Trick the user into dragging the malicious element from Chrome into a vulnerable target application.
- The target application queries the ContentProvider URI for DISPLAY_NAME and receives the traversal string.
- If the target app uses DISPLAY_NAME to construct a file path, the payload is written outside the intended directory.
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 you drag a file from one app to another, the receiving app asks the sender for details like the file's name. Chrome on Android was passing along a name that a malicious page could control, including characters like '../' that mean 'go up a folder'. If the receiving app trusted that name and saved the file without checking, the file could end up outside the intended folder, overwriting important files.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.