high · M5 · MASVS-NETWORK-2 · PTKD-NET-TRUSTALL
TLS validation appears disabled (trust-all / accept-all hostnames)
The app references a known trust-all TrustManager or accept-all HostnameVerifier (Android), or an API or setting that accepts any certificate (iOS), which disables TLS authentication and enables MITM.
How it is exploited
A custom TrustManager that returns without checking, or a HostnameVerifier that always says yes, accepts any certificate. Any MITM proxy terminates your "secure" connection with a self-signed cert and reads everything.
Why it matters
TLS becomes decorative: credentials and data are fully exposed to any active network attacker, and app stores reject builds for this.
How to fix it
- Delete the trust-all TrustManager/HostnameVerifier (they usually date from a debugging session).
- Use the platform defaults; for internal CAs, ship the CA in a network-security-config instead of disabling validation.
- Add a CI grep/lint for X509TrustManager overrides so it cannot return.
Does your app have this?
PTKD checks your build or your source project for PTKD-NET-TRUSTALL and every other check in this knowledge base.
Scan your appReferences
Related checks (M5)
- First-party HTTPS API without HSTS
- Cleartext HTTP traffic at runtime
- Session cookie without Secure/HttpOnly
- TLS interception succeeded (no certificate pinning)
- Weak TLS version negotiated at runtime
- Capacitor WebView allows cleartext or mixed content
- App Transport Security disabled (NSAllowsArbitraryLoads)
- App Transport Security insecure exception domains