Skip to content

In-depth lesson · WebView flaws

Root causes

Every point the WebView flaws reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 1 to 16 of 16
  1. The exported deep-link handler passed an attacker-controlled URL straight into a WebView without validating the destination or restricting which hosts may load.

    Seen in 5 reports
  2. Host validation used a substring check instead of an exact match or proper suffix check, so any host containing the trusted string passed.

    Seen in 2 reports
  3. JavaScript was enabled in a WebView without restricting which pages could load or limiting the exposed interfaces to safe ones.

    Seen in 1 report
  4. The address bar was refreshed before the navigation result was confirmed, and the displayed hostname was normalised differently from the hostname used for the request.

    Seen in 1 report
  5. The JavaScript interface exposed by the WebView did not restrict which apps could be launched or validate the caller.

    Seen in 1 report
  6. Intent handling in the browser and receiving apps did not consistently require user activation, the browsable category, or a clear origin prompt before launching other apps or URLs.

    Seen in 1 report
  7. The app failed to validate or restrict user-supplied URLs before loading them in a WebView, allowing navigation to attacker content.

    Seen in 1 report
  8. The exported activity accepted an unvalidated URL extra and loaded it into a WebView with JavaScript enabled and universal access from file URLs, allowing local file reads and exfiltration.

    Seen in 1 report
  9. The navigation activity accepted a URL extra without validating its scheme, allowing data: and javascript: URLs to load in the WebView.

    Seen in 1 report
  10. The app trusted wildcard cloud storage domains, exposed a JavaScript bridge with file operations to all WebView content, and let deep links load attacker pages without proper validation.

    Seen in 1 report
  11. The default WebView external navigation handler sanitised the component, category and selector of intent:// URIs but did not strip URI permission grant flags.

    Seen in 1 report
  12. The native bridge was registered with the old addJavascriptInterface API, which is not scoped to a single frame or origin, so every iframe could reach it.

    Seen in 1 report
  13. The exported activity passed an untrusted intent extra directly to WebView.loadUrl without validating scheme or host, and also attached an authorization header and a JavaScript bridge.

    Seen in 1 report
  14. The exported deep-link activity accepted web content from any server if the URI contained a specific string, and the WebView exposed a bridge granting an authorization token.

    Seen in 1 report
  15. URL validation only checked a string prefix and accepted plain HTTP, so a network attacker could alter the page loaded into a WebView with a privileged interface.

    Seen in 1 report
  16. The WebView component did not validate or restrict the URL parameter in deep links, allowing arbitrary schemes such as javascript: and file: to load.

    Seen in 1 report