Why it matters

The platforms default to TLS, but configuration exceptions, custom trust managers and libraries can quietly switch it off. One cleartext endpoint or one disabled certificate check exposes tokens to anyone on the same network.

How to meet it

  • Keep App Transport Security on with no global exceptions, and allow no cleartext in the Android Network Security Configuration.
  • Trust only system certificate authorities in release builds; never accept user-installed CAs or disable certificate validation.
  • Check the built app's configuration, not only the source file, before release.

MASTG tests in the local projects

The local projects run these OWASP MASTG v2.0.0 tests for MASVS-NETWORK-1, as tests you can repeat on your own machine.

MASTG testPlatformProject
MASTG-TEST-0322: App Transport Security Configurations Allowing Cleartext TrafficiOSKeep an iOS app's storage, links and web bridge in bounds · TransportTests
MASTG-TEST-0235: Android App Configurations Allowing Cleartext TrafficAndroidRepair an Android app's links, components, network policy and storage · NetworkConfigTests
MASTG-TEST-0286: Network Security Configuration Allowing Trust in User-Provided CAsAndroidRepair an Android app's links, components, network policy and storage · NetworkConfigTests

Guides on this site

Practice

References

  1. MASVS-NETWORK-1 (OWASP MASVS v2.1.0)
  2. MASVS-NETWORK: Network Communication (OWASP MASVS v2.1.0)

List data from the publisher. A guide is listed as the main subject when the weakness or risk is what the guide is about, and as covering it when a dedicated section or worked example addresses it.

Control statements are quoted from OWASP MASVS v2.1.0, licensed CC BY-SA 4.0; the rest is this site's summary. MASTG tests are those the iOS and Android projects here run, with their titles from mas.owasp.org. License.