Android Deep Links & iOS Universal Links: Security Testing
How attackers exploit insecure Android Deep Links and iOS Universal Links to hijack OAuth callbacks, trigger actions, or open malicious WebViews.
Mobile Security · By Thimmagurudu Bathini, CTO · Published · 5 min read
How Malicious Apps Hijack Custom URI Schemes
Mobile deep links make user onboarding seamless, but unverified custom URI schemes (myapp://) can be registered by any malicious app on the same device. During mobile penetration testing, engineers test how incoming intents and URL parameters are routed to WebViews and auth handlers.
# Verify whether exported activity opens arbitrary external URL in WebView
adb shell am start -a android.intent.action.VIEW \
-d "myapp://open?url=https://untrusted.example"Custom Schemes vs. App Links & Universal Links
| Link Type | Primary Risk | Secure Configuration |
|---|---|---|
| Custom URI Scheme (myapp://) | Any installed app can claim the scheme and intercept OAuth codes | Use HTTPS App Links / Universal Links for sensitive callbacks |
| Android App Links | Missing assetlinks.json verification falls back to disambiguation | Host verified /.well-known/assetlinks.json with autoVerify=true |
| WebView Routing | Deep link passes arbitrary ?url= parameter into privileged WebView | Validate destination host strictly against HTTPS allowlist |
Testing Deep Link Routing Into WebViews
- Inspect AndroidManifest.xml intent-filters and iOS Info.plist CFBundleURLTypes for exported or custom schemes.
- Craft ADB am start or Safari deep-link payloads to load arbitrary external URLs inside in-app WebViews.
- Test OAuth/SSO callback deep links for CSRF state validation and PKCE enforcement.
- Verify sensitive actions (payments, password changes) never execute automatically from a deep link without user confirmation.
Validating Destinations & Enforcing PKCE
Migrate authentication and payment callbacks from custom URI schemes to verified Android App Links and iOS Universal Links, and strictly allowlist WebView URLs.
Include deep-link and WebView bridge testing in your mobile VAPT from ₹36,000 + 18% GST. Request a scoped proposal →
Mobile Deep Link Security Questions
Can deep links lead to WebView XSS or token theft?
Yes—if a deep link loads an untrusted URL inside a WebView with JavaScript bridges enabled.
Are deep links tested in Android VAPT?
Yes, every Android and cross-platform mobile VAPT checks exported components, intents, and deep links.