Skip to content

In-depth lesson · WebView flaws

Tips for beginners

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 13 of 13
  1. If you find host validation, check for substring matching by using a domain that contains the trusted string, such as trusted.com.evil.com. Also test if the check is bypassed by adding extra parameters or using a different branch of the deep-link router.

    Seen in 4 reports
  2. Use ADB to start exported activities with a URL extra pointing to your own server, and see if the app loads your page. Check whether the WebView has JavaScript enabled and whether any JavaScript interfaces are exposed.

    Seen in 3 reports
  3. Test deep links that take a URL parameter: craft a link to your site and see if it opens inside the app with the app's session. Also try javascript: and file: schemes to test for script execution and local file access.

    Seen in 3 reports
  4. Look for JavaScript bridges: if a WebView exposes a bridge, try to call its methods from your loaded page. Common impacts include reading files, launching apps, or stealing tokens. Document the methods you can call and the data you can access.

    Seen in 3 reports
  5. Check for token leakage: if the WebView attaches an authorization header or passes a token to a JavaScript object, see if you can capture it on your server by loading your page through a deep link.

    Seen in 3 reports
  6. Demonstrate real impact: show that you can load a phishing page, steal a token, read a file, or call a sensitive bridge method. Avoid reporting theoretical issues without proof of exploitability.

    Seen in 3 reports
  7. Start by decompiling the APK and examining the AndroidManifest.xml for exported activities, especially those with intent filters for deep links. Look for activities that accept URL parameters and load them into a WebView.

    Seen in 2 reports
  8. On iOS, test in-app browsers for address bar spoofing by checking if the displayed hostname can be manipulated through Unicode normalisation or early updates. Also test if you can override the JavaScript bridge to intercept messages.

    Seen in 2 reports
  9. Always verify that the component is exported and reachable by other apps. A common mistake is to report a vulnerability in a non-exported activity or one that requires permissions you don't have.

    Seen in 2 reports
  10. Test for open redirects in deep links: if a URL parameter is not validated, you might redirect the WebView to your site. Combine this with a JavaScript bridge to escalate impact.

    Seen in 2 reports
  11. Be careful with out-of-scope reports: ensure the app is in scope and the vulnerability is in the app itself, not in the underlying WebView or OS. Also avoid reporting issues that require unrealistic user interaction or already known platform bugs.

    Seen in 2 reports
  12. When testing intent URIs, check if the app strips URI permission grant flags. If not, you might be able to gain access to the host app's files through a companion app.

    Seen in 1 report
  13. Check if the WebView allows universal access from file URLs. If so, you might be able to read local files by loading a file URL or an attacker page that accesses file URLs.

    Seen in 1 report