Vulnsy
highMobile

Insufficient Transport Layer Security

OWASP Mobile Top 10 2024 - M5: Insecure CommunicationCWE-295: Improper Certificate ValidationCWE-319: Cleartext Transmission of Sensitive InformationCWE-757: Selection of Less-Secure Algorithm During Negotiation

Discover how insufficient TLS in mobile apps enables man-in-the-middle attacks. Learn certificate pinning, ATS enforcement, and network security configuration.

What is Insufficient Transport Layer Security?

Insufficient Transport Layer Security in mobile applications refers to failures in implementing secure network communications, enabling attackers to intercept, read, and modify data transmitted between the mobile application and backend servers. While desktop browsers have largely solved transport security through browser-enforced HTTPS and certificate validation, mobile applications communicate directly over network sockets, giving developers both the flexibility and responsibility to implement transport security correctly—a responsibility that is frequently mishandled.

Mobile applications are particularly vulnerable to transport layer attacks because they frequently connect over untrusted networks. Users routinely connect to public WiFi networks in airports, hotels, coffee shops, and conference centers where man-in-the-middle (MitM) attacks are trivial to execute. Cellular networks, while more difficult to intercept, are not immune—rogue base stations and SS7 protocol vulnerabilities enable interception of mobile data traffic. The assumption that network traffic is private is fundamentally unsafe for mobile applications.

Common transport layer failures in mobile apps include: communicating over plaintext HTTP instead of HTTPS, disabling or weakening TLS certificate validation (often introduced during development and left in production), failing to implement certificate pinning to prevent interception by trusted-but-malicious CA certificates, using deprecated TLS versions (TLS 1.0, 1.1) or weak cipher suites, and transmitting sensitive data in URL parameters that are logged by intermediary systems. These failures undermine every other security control in the application because an attacker who can intercept traffic has access to authentication credentials, session tokens, and all transmitted data.

How It Works

Man-in-the-middle attacks against mobile applications follow a well-established pattern. The attacker positions themselves between the mobile device and the network gateway, either through ARP spoofing on a shared WiFi network, DNS spoofing to redirect traffic, or operating a malicious WiFi access point (evil twin attack). Tools like mitmproxy, Burp Suite, and Charles Proxy can be configured as transparent proxies that intercept all network traffic from the target device.

For HTTPS traffic, the attacker generates a self-signed or custom CA certificate and installs it on the target device (for testing) or relies on the application's failure to properly validate certificates. Applications that disable certificate validation (common in debug builds accidentally released to production), accept self-signed certificates, or do not implement certificate pinning will establish HTTPS connections through the attacker's proxy without any errors or warnings. The attacker can then decrypt, inspect, modify, and re-encrypt all traffic in real time.

Even applications with correct TLS implementation may be vulnerable through secondary channels. WebView components within the application may have separate TLS configurations that are weaker than the native networking stack. Third-party SDKs and advertising libraries bundled with the application may make their own insecure network connections. Custom URL schemes and deep links may transmit sensitive data through unencrypted channels. Push notification payloads containing sensitive data may be transmitted and stored insecurely. The application may also leak sensitive data through DNS queries, which are typically unencrypted even when HTTPS is properly implemented.

Impact

  • Complete interception of authentication credentials including usernames, passwords, and multi-factor authentication tokens transmitted during login
  • Session hijacking through stolen session tokens or JWT tokens intercepted during API communications, enabling full account takeover
  • Data manipulation where attackers modify API responses to alter application behavior, inject malicious content, or manipulate financial transactions
  • Privacy violations through interception of personal communications, location data, health information, and other sensitive data transmitted by the application
  • Malware injection by modifying application update responses or downloaded resources to include malicious code that executes on the user's device
  • API key and secret theft when application secrets, API keys, or OAuth tokens are intercepted during network communications

Remediation Steps

  1. Enforce HTTPS for all network communications without exception. On iOS, enable App Transport Security (ATS) without exceptions—ATS enforces HTTPS with TLS 1.2+ and forward secrecy by default. On Android, implement a Network Security Configuration that disables cleartext traffic: <base-config cleartextTrafficPermitted="false">. Audit all network requests to ensure no HTTP connections exist.
  2. Implement certificate pinning to protect against MitM attacks using compromised or rogue CA certificates. Pin against the server certificate's public key (SubjectPublicKeyInfo) rather than the full certificate to survive certificate rotation. Use backup pins for disaster recovery. On iOS, use URLSession delegate methods or TrustKit library. On Android, use Network Security Configuration's <pin-set> element or OkHttp's CertificatePinner.
  3. Configure TLS to use only strong protocol versions (TLS 1.2 minimum, TLS 1.3 preferred) and cipher suites that provide forward secrecy (ECDHE key exchange). Disable SSLv3, TLS 1.0, TLS 1.1, and weak cipher suites (RC4, DES, 3DES, export ciphers). Validate server TLS configuration using tools like SSL Labs.
  4. Never disable certificate validation in production builds. Implement build configuration checks that ensure development-only certificate bypass code is stripped from release builds. Use compile-time flags or build variants (Android) to prevent debug TLS configurations from reaching production.
  5. Audit all third-party SDKs and libraries for transport security. Verify that advertising, analytics, and crash reporting SDKs use HTTPS with proper certificate validation. Remove or replace libraries that make insecure network connections or that downgrade TLS security.
  6. Implement additional transport security measures: use HTTP Strict Transport Security (HSTS) headers on all server responses, transmit sensitive data only in request bodies (never in URL parameters), implement DNS-over-HTTPS for DNS privacy, and consider using mutual TLS (mTLS) for high-security applications.
  7. Monitor for certificate pinning failures in production by implementing reporting (HTTP Public Key Pinning report-uri or equivalent). Track pinning failure rates to detect potential MitM attacks targeting your users and to identify certificate rotation issues before they cause service disruption.

Testing Guidance

Begin by configuring a proxy (Burp Suite, mitmproxy, or Charles Proxy) to intercept all traffic from the test device. Install the proxy's CA certificate on the device and verify whether the application establishes connections through the proxy without errors—this indicates missing certificate pinning. Test with both the proxy CA installed (user-trusted) and without it (self-signed) to differentiate between apps that trust user-installed CAs versus apps that accept any certificate.

Analyze all network traffic for security issues: identify any HTTP (non-HTTPS) connections, check TLS protocol versions and cipher suites negotiated for each connection, look for sensitive data in URL parameters (visible in proxy logs and server access logs), verify that all API responses include appropriate security headers (HSTS, Cache-Control), and check whether WebView components within the app make separate insecure connections. Use Frida to hook TLS validation functions at runtime and test whether certificate validation can be bypassed programmatically.

Test certificate pinning implementation by attempting to intercept traffic with a user-installed CA certificate (should succeed without pinning), with a proxy using a different CA (should fail with pinning), and by modifying the application binary to disable pinning (test resilience). Use tools like objection (android sslpinning disable or ios sslpinning disable) to test bypass resilience. Verify that pinning failure results in connection termination, not fallback to unpinned connections. Test third-party SDK traffic separately by filtering proxy traffic by domain to identify SDKs that make insecure connections independent of the main application's TLS configuration.

References

mobiletlssslcertificate-pinningmitmtransport-securityhttpsowasp-mobile-top-10

Frequently Asked Questions

What is Insufficient Transport Layer Security?

Insufficient Transport Layer Security in mobile applications refers to failures in implementing secure network communications, enabling attackers to intercept, read, and modify data transmitted between the mobile application and backend servers. While desktop browsers have largely solved transport security through browser-enforced HTTPS and certificate validation, mobile applications communicate directly over network sockets, giving developers both the flexibility and responsibility to...

How does Insufficient Transport Layer Security work?

Man-in-the-middle attacks against mobile applications follow a well-established pattern. The attacker positions themselves between the mobile device and the network gateway, either through ARP spoofing on a shared WiFi network, DNS spoofing to redirect traffic, or operating a malicious WiFi access point (evil twin attack).

How do you test for Insufficient Transport Layer Security?

Begin by configuring a proxy (Burp Suite, mitmproxy, or Charles Proxy) to intercept all traffic from the test device. Install the proxy's CA certificate on the device and verify whether the application establishes connections through the proxy without errors—this indicates missing certificate pinning.

How do you remediate Insufficient Transport Layer Security?

Enforce HTTPS for all network communications without exception. On iOS, enable App Transport Security (ATS) without exceptions—ATS enforces HTTPS with TLS 1.2+ and forward secrecy by default. On Android, implement a Network Security Configuration that disables cleartext traffic: &lt;base-config cleartextTrafficPermitted="false"&gt;. Audit all network requests to ensure no HTTP connections exist.

Report Vulnerabilities Faster with Vulnsy

Stop rewriting the same findings. Use Vulnsy's reusable templates, collaborative workflows, and professional report generation to deliver pentest reports 10x faster.

Start Free Trial