Insufficient validation of untrusted input in WebAppInstalls (CVE-2026-13872)
A malicious Android app can launch a Trusted Web Activity with file paths that bypass the FileSystem Access blocklist, granting its web origin read and write access to Chrome's private data directory. The attacker's website could then read sensitive files such as cookies and session tokens.
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.
Overview: A malicious Android application can potentially bypass the FileSystemAccess API blocklist to obtain read and write access to arbitrary files within Chrome's private data directory (e.g., Cookies). This occurs because Trusted Web Activity (TWA) intents with EXTRA_FILE_HANDLING_DATA pass unsanitized file paths directly to the LaunchQueue, which creates file handles with auto-granted permissions without verifying if the paths are sensitive.
Affected files:
chrome/browser/android/webapps/twa_launch_queue_delegate.cccomponents/webapps/browser/launch_queue/launch_queue.ccchrome/browser/android/webapps/web_app_launch_handler.cccontent/browser/file_system_access/file_system_access_manager_impl.ccchrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
Estimated timestamp from git blame: 2026-02-18
Overview
The Trusted Web Activity (TWA) launch flow on Android contains a potential vulnerability that allows a malicious application to grant its corresponding web origin full read/write access to Chrome's internal profile directory and other sensitive system files.
When a TWA is launched via an intent, it can include EXTRA_FILE_HANDLING_DATA containing a list of file URIs. These URIs are passed from Java to the browser process via WebAppLaunchHandler::NotifyLaunchQueue without any path validation or sanitization.
Vulnerability Details
- Unsanitized Input: In
chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/WebAppLaunchHandler.java, theEXTRA_FILE_HANDLING_DATAbundle is parsed, and its URIs are converted to strings. These strings are passed to the native JNI methodnotifyLaunchQueuewithout any path validation or resolution. - Implicit Conversion: In
chrome/browser/android/webapps/web_app_launch_handler.cc, these strings are implicitly converted tobase::FilePathobjects and added to awebapps::LaunchParamsobject. - Validation Bypass: The
webapps::LaunchQueueattempts to validate these parameters using its delegate (TwaLaunchQueueDelegate). However,TwaLaunchQueueDelegate::IsValidLaunchParamsis a stub that always returnstrue, performing no checks on the provided paths. - Blocklist Evasion:
LaunchQueue::SendLaunchParamsprocesses these paths by callingFileSystemAccessManagerImpl::CreateFileEntryFromPathwith theUserAction::kSaveparameter. Crucially,CreateFileEntryFromPathdoes not invokeConfirmSensitiveEntryAccess, completely bypassing the FileSystem Access blocklist that normally protects sensitive directories like/data/data/com.android.chrome/. - Auto-Granted Permissions:
CreateFileEntryFromPathrequests permissions fromChromeFileSystemAccessPermissionContext. Because the action isUserAction::kSave(which normally implies a user explicitly chose a file via a picker), the context automatically grants both read and write permissions without prompting the user. - Delivery to Origin: The resulting
FileSystemFileHandleis delivered to the attacker's origin via thewindow.launchQueue.setConsumerJavaScript API.
Potential Attacker Steps
Note: These are suggested/potential steps; our tooling agent does not currently have the ability to run code to verify this with a live Proof of Concept.
- An attacker creates a malicious Android app and a corresponding website, establishing a TWA relationship via Digital Asset Links.
- The malicious app constructs an intent to launch its TWA.
- The app attaches an
EXTRA_FILE_HANDLING_DATAbundle to the intent, containing absolute path strings pointing to sensitive files (e.g.,/data/data/com.android.chrome/app_chrome/Default/Cookies). - The app fires the intent, launching Chrome.
- The attacker's TWA website uses the
window.launchQueueAPI to receive theFileSystemFileHandle. - The website calls
handle.getFile()to read the sensitive file's contents, stealing user data or session tokens.
Suggested Fix
To remediate this issue, the browser must validate the paths provided in the launch parameters against the FileSystemAccess blocklist before creating file handles.
- Update
CreateFileEntryFromPath: ModifyFileSystemAccessManagerImpl::CreateFileEntryFromPath(andCreateDirectoryEntryFromPath) to invokeConfirmSensitiveEntryAccessand handle the asynchronous result before granting access, similar to howDidChooseEntriesoperates. - Enhance
TwaLaunchQueueDelegate: Implement proper validation inTwaLaunchQueueDelegate::IsValidLaunchParamsto ensure that paths provided via Android intents are safe and do not point to sensitive directories or files. - Sanitize URIs in Java: Consider adding validation or resolution logic in
WebAppLaunchHandler.javato ensure that only expectedfile://orcontent://URIs are processed, preventing the direct use of absolute paths.
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
Likely, the TWA launch queue delegate's validation is a stub that always returns true, and the file entry creation path skips the sensitive-entry access check, so unsanitised file paths from an Android intent are granted read/write permissions without user confirmation.
Impact
The attacker's website could read and write arbitrary files in Chrome's private data directory, potentially stealing user data or session tokens; the report notes these steps are suggested and not verified with a live proof of concept.
What the attacker needed
Victim installs malicious Android app; victim visits attacker's website; TWA relationship via Digital Asset Links
The fix
The browser should validate paths from launch parameters against the FileSystemAccess blocklist before creating file handles, by invoking ConfirmSensitiveEntryAccess and implementing proper validation in TwaLaunchQueueDelegate.
How it was found
- An attacker creates a malicious Android app and a corresponding website, establishing a TWA relationship via Digital Asset Links.
- The malicious app constructs an intent to launch its TWA.
- The app attaches an EXTRA_FILE_HANDLING_DATA bundle to the intent, containing absolute path strings pointing to sensitive files.
- The app fires the intent, launching Chrome.
- The attacker's TWA website uses the window.launchQueue API to receive the FileSystemFileHandle.
- The website calls handle.getFile() to read the sensitive file's contents.
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.
Chrome has a security feature that stops websites from reading sensitive files on your device, like its own cookies. This report says a malicious Android app could trick Chrome into skipping that check, letting the app's website read those files. The attacker would need you to install their app and visit their website.
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.