Insufficient validation of untrusted input in WebAppInstalls (CVE-2026-15115)
The Android Trusted Web Activity file-handling path forwards content URIs from a co-installed app to the File System Access API without checking whether the calling app has permission for those URIs. If Chrome already holds a persisted permission for a URI, an attacker-controlled TWA could read or write that file without a prompt.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 33 days
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: The Android Trusted Web Activity (TWA) file-handling path accepts arbitrary content URIs from a co-installed app and forwards them to the File System Access (FSA) API without checking if the calling app has permissions on those URIs. If Chrome holds a persisted permission for a URI from a prior user action, an attacker-controlled TWA can read or write that file promptlessly. This allows a co-installed, zero-permission app to potentially bypass origin isolation and access previously granted Storage Access Framework (SAF) documents.
Affected files:
chrome/browser/android/webapps/twa_launch_queue_delegate.ccchrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.javachrome/android/java/src/org/chromium/chrome/browser/customtabs/content/WebAppLaunchParams.javachrome/browser/android/webapps/web_app_launch_handler.cccomponents/webapps/browser/launch_queue/launch_queue.cc
Estimated timestamp from git blame: 2025-04-22
Root Cause Analysis
When a Trusted Web Activity (TWA) is launched with file-handling intent data on Android, the content URIs provided by the launching application are parsed and directly forwarded to the File System Access (FSA) API.
Specifically, the following chain occurs:
- Extraction (Java):
CustomTabIntentDataProvider.javaretrieves the parcelableEXTRA_FILE_HANDLING_DATAbundle containing raw Content URIs from the launching intent without checking if the calling app actually holds read/write permissions for those URIs. - Validation (C++): In
chrome/browser/android/webapps/twa_launch_queue_delegate.cc,IsSensitivePathevaluates the URIs. It only blocks paths starting with Chrome's own package content prefix (content://<package_name>.). Legitimate third-party content URIs (such ascontent://com.android.externalstorage.documents/...) are allowed to pass through by design. - Handle Creation:
components/webapps/browser/launch_queue/launch_queue.cctakes these validated paths and callsCreateFileEntryFromPathwithUserAction::kSave(as seen inAddFileEntry). - Auto-Granting Permissions: In
chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc, theUserAction::kSaveflag automatically grants both read and write status (i.e.,PermissionStatus::GRANTED) to the target origin without presenting any security confirmation dialog or prompt. - Persistence: Since Android's
ContentResolvertracks permission grants at the UID (application) level rather than the web origin level, and since Chrome's UID persists SAF permissions obtained from previous standard file-picker tasks (viatakePersistableUriPermission), the system-level file descriptor can be opened and modified. The attacker's origin (https://attacker.example) receives a fully write-grantedFileSystemFileHandlethrough the standardlaunchQueue.setConsumerAPI.
Note: The steps below are theoretical/suggested mechanics because our analysis is based on static code review, and we do not have a working automated exploit proof-of-concept.
Potential Attack Scenario
- User Precondition: The user visits a legitimate origin (e.g.,
https://victim.example) on Android and selects a sensitive document (e.g.,Documents/report.docx) via the standard system file picker. Under the default-enabledkSelectFileOpenDocumentfeature, Chrome's UID permanently holds a persisted OS-level read/write permission to the file. - App Installation: The user installs a malicious app that has zero Android permissions, but declares Digital Asset Links tying it to an attacker-controlled origin (e.g.,
https://attacker.example). - Intent Spoofing: The malicious app binds to Chrome's Custom Tabs service and sends a TWA launch intent pointing to its origin. Inside
EXTRA_FILE_HANDLING_DATA, it includes the predictable content URI of the target document:content://com.android.externalstorage.documents/document/primary%3ADocuments%2Freport.docx. - Promptless Overwrite: The TWA opens
https://attacker.example, which receives the file handle via thelaunchQueueAPI. The page callscreateWritable()on the handle and overwrites or reads the user's document silently without any picker dialog or confirmation prompt.
Suggested Fix
Ensure that the TWA launch path validates that the launching client application actually holds permission for any content URIs it passes via the file-handling intent.
On modern Android versions, this can be achieved by executing a caller permission check during intent parsing (similar to the logic in SelectFileDialog.java::doesCallerHavePermissionForUri):
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
activity.getCurrentCaller().checkContentUriPermission(uri, Intent.FLAG_GRANT_READ_URI_PERMISSION);
}
Alternatively, Chrome must verify that the launching package has read/write permissions for the content URIs before converting them into raw base::FilePath entries in the launch queue.
Evaluated with Chrome root at commit: e9507a33bb4148ee071aaaf8a7e9ad68770359bf
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 TWA launch path does not verify that the launching app holds permission for the content URIs it supplies, and the save user action then auto-grants read and write access to the target origin.
Impact
A co-installed zero-permission app could potentially bypass origin isolation and read or write previously granted Storage Access Framework documents without any prompt.
What the attacker needed
User previously granted a persisted file permission; malicious app installed with zero permissions; app declares Digital Asset Links for attacker origin; Android device with Chrome
The fix
The TWA launch path should validate that the launching client app actually holds permission for any content URIs it passes before converting them into file entries.
How it was found
- The user opens a document through the system file picker on a legitimate site, so Chrome keeps a persisted permission for that file.
- The user installs a malicious app with no Android permissions that is linked to an attacker-controlled origin.
- The malicious app binds to Chrome's Custom Tabs service and sends a TWA launch intent containing the predictable content URI of the target document.
- The TWA opens the attacker origin, which receives a file handle through the launchQueue API and can read or overwrite the document without a prompt.
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 files through special references called content URIs. Chrome sometimes remembers that a user allowed a website to access a file. This report says a malicious app could trick Chrome into handing that remembered file access to a different website, letting it read or overwrite the file without asking the user again.
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.