medium · M4 · MASVS-PLATFORM-2 · PTKD-HYBRID-NAV-WILDCARD
Hybrid WebView may open any website inside the app
The Capacitor allowNavigation list or the Cordova config.xml whitelist allows every origin (*). Any link, redirect or injected URL then opens inside the app's WebView instead of the browser, and that page can call the app's native plugins (camera, files, storage).
How it is exploited
allowNavigation: ["*"] is set so an OAuth page opens in-app. A chat message carries a link to an attacker's page; it loads inside the app's WebView and calls the Capacitor Camera and Filesystem plugins through the bridge.
Why it matters
Third-party pages run with the app's native plugin access, and phishing pages look like part of the app.
How to fix it
- Replace "*" with the exact hosts that must load in-app.
- Open every other URL with the Browser plugin / InAppBrowser (system browser).
- Cordova: restrict <access> and <allow-navigation>, keep <allow-intent> for external links, add a Content-Security-Policy meta tag.
Does your app have this?
PTKD checks your build or your source project for PTKD-HYBRID-NAV-WILDCARD and every other check in this knowledge base.
Scan your appReferences
Related checks (M4)
- Supabase function runs any SQL the caller sends
- Deep link URL loaded or opened without a host check (heuristic)
- Wildcard associated domain (universal-link hijack surface)
- Process execution via system()/exec/popen
- Unsafe C string function (buffer overflow risk)
- Hijackable custom URL-scheme deep link
- SQL built by joining request data into a string (text search)
- HTML rendered without sanitizing (dangerouslySetInnerHTML / innerHTML)