high · M5 · MASVS-NETWORK-2 · PTKD-NET-USERCA
Network config trusts user-installed CAs
The network-security-config adds the 'user' trust anchor, so any CA the device user installs (or is tricked into installing) is trusted, a classic MITM/interception foothold.
How it is exploited
A user is tricked into installing a "VPN profile" or corporate certificate. Because the app trusts user-installed CAs, that certificate lets an interception proxy decrypt and rewrite all of the app's TLS traffic.
Why it matters
Full TLS interception: credentials, tokens, and personal data exposed to whoever controls the installed CA.
How to fix it
- Remove <certificates src="user"/> from the production trust-anchors.
- Trust only the system store in release builds; keep user CAs inside <debug-overrides> if QA needs a proxy.
- Add certificate pinning for your API domains where rotation is under your control.
Trust anchors: system only in release
<base-config>
<trust-anchors><certificates src="system"/></trust-anchors>
</base-config>
<debug-overrides>
<trust-anchors><certificates src="user"/></trust-anchors>
</debug-overrides>Does your app have this?
PTKD checks your build or your source project for PTKD-NET-USERCA 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