Improper TLS Certificate Validation in the App
The app accepts TLS certificates without validating them properly, so an attacker on the network can intercept its encrypted traffic with a certificate of their own.
| Severity | High |
| CVSS 3.1 | 7.4 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N Open in the calculator |
| CVSS 4.0 | 9.1 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-295: Improper Certificate Validation |
| OWASP Top 10 | A07:2025 Authentication Failures |
| MITRE ATT&CK | T1557 Adversary-in-the-Middle |
| Category | Cryptographic Failures |
Description
The application overrides or weakens the platform's TLS certificate validation, so that it accepts certificates that are self-signed, issued by an untrusted authority, expired or issued for a different host name. An attacker able to intercept the device's traffic, for example on public Wi-Fi or through a rogue access point, can then present their own certificate, decrypt the app's HTTPS traffic and change it, without any warning to the user. TLS provides no protection for the affected connections, so the impact is equivalent to unencrypted traffic: credentials, session tokens and all data the app exchanges with its servers are exposed, and the attacker can manipulate responses.
Typical causes are a custom Android X509TrustManager whose checkServerTrusted method does nothing, a HostnameVerifier that always returns true, a WebView onReceivedSslError handler that calls proceed(), an iOS URLSession delegate that accepts any server trust, or a networking library option that disables validation. These are often added during development to work with test servers and left in release builds.
Testing confirms the weakness by routing the app's traffic through an intercepting proxy whose certificate the device does not trust: a correctly built app refuses the connection, while a vulnerable one continues and its traffic can be read. Static analysis tools and code review find the patterns above, and Google Play warns developers about some of them.
Remediation
- Remove custom trust managers, host name verifiers and error handlers that weaken validation, and rely on the platform's default validation, which checks the certificate chain, validity period and host name.
- On Android, use the network security configuration for legitimate customisation, such as trusting a private certificate authority for specific domains, and its
debug-overrideselement for test certificates, which applies only to debuggable builds. - On iOS, do not override server trust evaluation in
URLSessiondelegates; where custom evaluation is needed, call the system evaluation (SecTrustEvaluateWithError) first and reject the connection if it fails. - In WebViews, cancel the request on certificate errors instead of proceeding.
- Review third-party networking libraries and cross-platform framework settings for options that disable validation.
Confirm the fix by repeating the interception test with an untrusted certificate and checking that every connection fails.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.