low · M8 · MASVS-RESILIENCE-4 · PTKD-WEBVIEW-DEBUG
WebView remote debugging enabled
setWebContentsDebuggingEnabled is referenced; if enabled in production it exposes WebView contents to anyone with adb/devtools access.
How it is exploited
setWebContentsDebuggingEnabled(true) in production lets anyone with ADB attach Chrome DevTools to your WebViews: read the DOM, cookies, localStorage, and inject script into live sessions.
Why it matters
Session material and in-page data are one USB cable away on any device.
How to fix it
- Gate it on BuildConfig.DEBUG so release builds never enable WebView debugging.
Debug builds only
if (BuildConfig.DEBUG) WebView.setWebContentsDebuggingEnabled(true)Does your app have this?
PTKD checks your build or your source project for PTKD-WEBVIEW-DEBUG and every other check in this knowledge base.
Scan your appReferences
Related checks (M8)
- JavaScript obfuscation in the build
- Export compliance (ITSAppUsesNonExemptEncryption) not declared
- HealthKit app that also ships an ads SDK
- Hardcoded unlock or promo code
- Purchases SDK configured with an empty or test key
- Purchase screen falls back to made-up prices or 'coming soon' text
- False-urgency copy on a purchase screen
- Hardcoded price on a purchase screen