Skip to content
Mobile Advisory Advanced CVE-2026-17741

Insufficient validation of untrusted input in WebView (CVE-2026-17741)

Android WebView's default external navigation handler parses intent:// URIs without sanitising Intent flags, so a malicious website can set URI permission grant flags. An attacker-controlled app could then gain read and write access to the host app's private files exposed through a FileProvider.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 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 without the security team.

Overview: Android WebView's default external navigation handler fails to sanitize Intent flags parsed from intent:// URIs. A malicious website can leverage this to grant a local attacker-controlled application read and write access to the host app's private files. This potentially allows a full bypass of the Android application sandbox if the host app uses a FileProvider.

Affected files:

  • android_webview/java/src/org/chromium/android_webview/AwContentsClient.java

Estimated timestamp from git blame: 2025-06-20

Description

In Android WebView, if an embedding application does not set a custom WebViewClient, external navigations are handled by the default AwContentsClient.sendBrowsingIntent method. This method uses Intent.parseUri to construct an Android Intent from an intent:// URI.

While the method sanitizes the Intent's component, category, and selector to prevent certain types of exploitation, it completely fails to sanitize the Intent's flags. The Android framework's Intent.parseUri explicitly parses the launchFlags fragment parameter and applies it to the intent.

By injecting flags such as Intent.FLAG_GRANT_READ_URI_PERMISSION (0x1) and Intent.FLAG_GRANT_WRITE_URI_PERMISSION (0x2), a malicious website can force the host application to fire an intent that delegates access to its own private content:// URIs (such as those exposed by a FileProvider). Because the Intent is fired from the host application's Activity context, the Android OS correctly attributes the Intent to the host app and honors the URI permission grant, inadvertently giving the attacker-specified target application full access to the host's private files.

Potential Attack Steps

Note: These are potential steps based on code analysis; a working Proof of Concept has not been executed.

  1. Preconditions: A victim application uses a WebView without setting a custom WebViewClient and implements a FileProvider with grantUriPermissions="true" (a common configuration for sharing files).
  2. Attacker Setup: The attacker publishes a malicious companion app (e.g., com.attacker.app) which the victim installs.
  3. Execution: The victim visits the attacker's malicious website inside the victim application's WebView.
  4. Bypass User Gesture: The attacker's server responds with an HTTP 302 redirect. This automatically bypasses the hasUserGesture check in AwContentsClient.sendBrowsingIntent.
  5. Crafted Payload: The redirect target is a crafted URI targeting the victim's FileProvider: intent://com.victim.fileprovider/internal_data.db#Intent;scheme=content;launchFlags=0x3;package=com.attacker.app;end
  6. Privilege Escalation: sendBrowsingIntent parses the URI, applying launchFlags=0x3 (Read and Write URI Permissions). It then calls context.startActivity(intent) using the victim app's context.
  7. Data Compromise: The Android OS launches com.attacker.app, explicitly granting it read and write permissions to internal_data.db. The attacker app can now silently exfiltrate or modify the victim app's private data, achieving a sandbox escape.

Suggested Fix

Implement Intent flag sanitization in AwContentsClient.sendBrowsingIntent before calling startActivity. This should mirror the protection already present in Chrome's ExternalNavigationHandler.sanitizeQueryIntentActivitiesIntent, which masks flags against a safe allowlist:

Java
intent.setFlags(intent.getFlags() & ALLOWED_INTENT_FLAGS);

The ALLOWED_INTENT_FLAGS list must strictly exclude URI permission granting flags (FLAG_GRANT_READ_URI_PERMISSION, FLAG_GRANT_WRITE_URI_PERMISSION, FLAG_GRANT_PERSISTABLE_URI_PERMISSION, and FLAG_GRANT_PREFIX_URI_PERMISSION).

Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33


Results 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.

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

The default WebView external navigation handler parses intent:// URIs and sanitises the component, category and selector but does not strip URI permission grant flags from the Intent.

Impact

An attacker-controlled app could gain read and write access to the host app's private files, potentially bypassing the Android application sandbox; the report notes that a working proof of concept has not been executed.

What the attacker needed

Victim app uses default WebViewClient; victim app has FileProvider with grantUriPermissions; victim installs attacker's app; victim visits attacker's website in the app

The fix

The handler should mask Intent flags against a safe allowlist that excludes URI permission granting flags before calling startActivity.

How it was found

  1. The victim app uses a WebView without a custom WebViewClient and has a FileProvider with grantUriPermissions enabled.
  2. The attacker publishes a malicious companion app that the victim installs.
  3. The victim visits the attacker's website inside the victim app's WebView.
  4. The attacker's server responds with an HTTP 302 redirect to bypass the user gesture check.
  5. The redirect target is a crafted intent:// URI that includes launchFlags for read and write URI permissions and names the attacker's package.
  6. The WebView parses the URI and starts the attacker app with the granted permissions, allowing it to read or modify the victim's private file.

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 with other apps through a component called a FileProvider. When a WebView opens a special intent:// link, it builds an Android Intent, and the code did not clean up permission flags in that link. A malicious site could therefore tell the phone to give an attacker's app access to the victim app's private files.

What is Mobile?

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Mobile app vulnerabilities

The lesson behind this report.

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.