Skip to content
Path traversal Advisory Advanced CVE-2026-13851

Insufficient validation of untrusted input in WebAppInstalls (CVE-2026-13851)

Chrome's C++ code checks content-URI prefixes against raw bytes, while Android's ContentResolver decodes the authority, so a percent-encoded dot can bypass the blocklist. A malicious Trusted Web Activity could then read or write Chrome's internal FileProvider paths.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 28 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: A potential parser differential between Chrome's raw-byte prefix checking and Android's ContentResolver URI parsing allows a bypass of content-URI blocklists. By percent-encoding the authority (e.g., using '%2E' instead of '.'), a malicious Trusted Web Activity (TWA) can potentially bypass Chrome's blocklist checks. This may enable a malicious TWA to obtain unauthorized read or write access to Chrome's internal FileProvider paths.

Affected files:

  • chrome/browser/android/webapps/twa_launch_queue_delegate.cc
  • chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc

Estimated timestamp from git blame: 2024-09-04

Potential Security Issue Overview

There is a potential parser differential vulnerability in Chrome for Android that can allow a malicious Trusted Web Activity (TWA) to bypass content-URI blocklist checks.

Chrome prevents TWAs from opening Chrome's own internal content URIs by performing raw-string prefix checks in C++. However, when the URI is actually opened at the Java platform level, Android's ContentResolver decodes the authority component. This discrepancy allows percent-encoded authorities (e.g., %2E instead of .) to bypass C++ blocklist checks while still resolving to Chrome's own non-exported FileProviders.

Root Cause Analysis

In chrome/browser/android/webapps/twa_launch_queue_delegate.cc and chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc, Chrome checks if a path is sensitive by executing a raw-byte comparison against a prefix containing Chrome's package name followed by a dot:

C++
// chrome/browser/android/webapps/twa_launch_queue_delegate.cc
if (path.IsContentUri()) {
  std::string package_name = base::android::apk_info::package_name();
  std::string chrome_content_prefix = base::StrCat({"content://", package_name, "."});
  return base::StartsWith(path.value(), chrome_content_prefix, base::CompareCase::INSENSITIVE_ASCII);
}

If the package name is com.android.chrome, the expected prefix is "content://com.android.chrome.".

If a malicious app registers a TWA file-handling URI with a percent-encoded dot in the authority (e.g., content://com.android.chrome%2EFileProvider/downloads/victim.pdf), the comparison at base::StartsWith fails because character offset 28 contains % (0x25) instead of . (0x2E).

When Chrome later resolves the URI to open the file, it executes the JNI call ContentUriUtils.openContentUri (base/android/content_uri_utils.cc), which calls getAssetFileDescriptor inside ContentUriUtils.java:

Java
Uri uri = Uri.parse(uriString);
...
afd = resolver.openAssetFileDescriptor(uri, mode);

Under Android OS specifications, ContentResolver extracts the provider authority using uri.getAuthority(), which explicitly returns the percent-decoded authority. Consequently, %2E decodes to ., yielding com.android.chrome.FileProvider. The request is successfully routed to Chrome's own internal FileProvider, bypassing the safety check.

Potential Attack Scenario

Note: Our tooling does not currently have the capability to execute code or run functional POCs. The steps below represent a theoretical, potential sequence of events based on static code analysis.

  1. A co-installed malicious app com.evil.twa hosts Digital Asset Links verification metadata for https://evil.example to establish TWA trust.
  2. The app fires a TWA intent with a percent-encoded file URI in EXTRA_FILE_HANDLING_DATA targeting: content://com.android.chrome%2EFileProvider/downloads/victim.pdf
  3. Chrome verifies the TWA trust and notifies the launch queue via JNI without normalizing or URL-decoding the input.
  4. C++ blocklist checks verify the raw string against "content://com.android.chrome." and miss the match because of the %2E encoding.
  5. The file handle is granted to the renderer with write permissions (UserAction::kSave policy).
  6. The renderer uses the handle to write or read data. This request is mapped to ContentUriUtils.java in the browser process.
  7. The Android OS decodes the authority to com.android.chrome.FileProvider and grants access because the requester runs under the same UID (confused deputy bypass of exported="false").

Suggested Fix

Before executing prefix validation on Content URIs in C++, Chrome should normalize the paths. Alternatively, the validation check should occur on a decoded or parsed representation of the authority.

For instance, we can decode percent-encoded sequences in the C++ string before verifying prefixes, or parse the URI via a robust URI parser (such as GURL or a utility that mirrors Android's decoding logic) and match against the decoded host/authority component.

Evaluated with Chrome root at commit: 9ebf4302210513a012c901d87a2668b3aadf8cc1


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 blocklist check compares the raw, still-encoded URI string against a prefix, while Android's ContentResolver decodes the authority before routing, so the two disagree on what the URI means.

Impact

A malicious TWA could potentially obtain unauthorised read or write access to Chrome's internal FileProvider paths, though the report is theoretical and no working proof of concept was executed.

What the attacker needed

Malicious app co-installed on device; TWA trust via Digital Asset Links; victim uses Chrome on Android

The fix

Chrome should normalise or decode content URIs before prefix validation, or parse the URI and match against the decoded authority.

How it was found

  1. A co-installed malicious app hosts Digital Asset Links metadata to establish TWA trust.
  2. The app fires a TWA intent with a percent-encoded file URI in EXTRA_FILE_HANDLING_DATA.
  3. Chrome verifies TWA trust and passes the URI to the launch queue without normalising it.
  4. The C++ blocklist check misses the match because of the percent encoding.
  5. The file handle is granted to the renderer with write permissions.
  6. Android decodes the authority and grants access to Chrome's internal FileProvider.

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 tries to stop web apps from touching its own private files by checking the start of a file address. But Android later decodes special characters in that address, so a cleverly encoded address slips past the check and reaches the private files.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.