VPN Provider Trust-Anchor / Tunnel MITM

← Privileged System-Provider Activation

vpn_provider_trust_anchor_abuse   HARD

CategoryPrivileged System-Provider Activation
OWASP Mobile (2024)M5
MASVSMASVS-NETWORK-1MASVS-NETWORK-2
MASWEMASWE-0027
MASTG (v2 tests)iOSNone publishedAndroidMASTG-TEST-0282
MASTG demosiOSMASTG-DEMO-0154AndroidNone published
CWECWE-295CWE-297CWE-940
PlatformAndroidiOS
Platform notesVpnService (Android) / NEVPNManager / Network Extension (iOS): the tunnel’s endpoint authentication is the boundary.

Description

An app that provides a VPN tunnel authenticates the tunnel endpoint weakly - disabled/loose certificate validation, a custom trust manager, user-controllable CA trust, hostname-validation bypass, or an insecure fallback transport - so an adjacent attacker MITMs all traffic the tunnel is supposed to protect. Distinct from app-level pinning: the whole-device VPN provider is the trust anchor (Prisma Access VPN-agent improper-cert-validation CVE-2026-0248 class).

How it works

An app that provides a device-wide VPN tunnel is the trust anchor for all tunneled traffic. Here it authenticates the tunnel endpoint with an accept-all trust manager, so certificate validation is effectively disabled, and it establishes a tunnel to a rogue MITM endpoint whose certificate hostname does not match, whose chain is untrusted, and which is anchored to a user-installed CA. Every flow routed through the tunnel is now interceptable (Prisma Access VPN-agent cert-validation MITM CVE-2026-0248 class). The secure path enforces chain trust and hostname match and rejects user-installed CAs, so the rogue endpoint is refused. The “real state” panel shows this device’s VpnService consent state (VpnService.prepare()); to fully arm a device-wide tunnel, implement a VpnService, confirm the system VPN consent dialog, and start it as a foreground service.

How to exercise it. DVMA is the harness - open this module from the home index and tap the demo action. The screen ships the malicious input and simulates the attacker (e.g. the companion app, crafted intent, or scanned payload) in-process, and the evidence panel prints the proof. The Tools (optional) and Attack inputs below are only needed to reproduce the exploit end-to-end on a real device.

Exploit steps

  1. Set up. Build DVMA with a flavor that enables the Privileged System-Provider Activation category (e.g. --dart-define-from-file=config/flavors/dev.json) and run on an emulator/simulator you control. The demo needs no external tooling; for the optional on-device reproduction the relevant tools are: mitmproxy, Burp Suite, testssl.sh, Wireshark · Android: adb, frida · iOS: frida, idevicesyslog.
  2. Locate the target. From the home index, open VPN Provider Trust-Anchor / Tunnel MITM (vpn_provider_trust_anchor_abuse). The How it works section above describes this module’s specific weakness; the screen states the intended-secure behavior and exposes the vulnerable action.
  3. Exploit. Drive the provider-activation / enablement workflow (accessibility, notification-listener, VPN, IME, phone-account, MediaProjection, credential-provider) and confirm the granted capability is invoked on an untrusted caller’s behalf - the enablement flow is the boundary.
  4. Observe the evidence. Trigger the vulnerable action and read the evidence panel - it prints the concrete proof (leaked value, accepted replay, executed payload, or unauthorized result).
  5. Contrast with the secure path. Run the module’s secure/hardened action (where provided) and confirm the same attack is rejected - this is what a correct implementation should do.
  6. Map it back. Cross-reference the MASTG v2 test(s) MASTG-TEST-0282 for the canonical procedure and remediation.

Tools (optional)

Android

iOS

Attack inputs

Payloads/artifacts you author for the on-device attack. The demo already ships and simulates these in-process (e.g. the malicious companion app / crafted intent is emulated inside the screen), so you only need to craft them to reproduce the exploit on a real device:

  • rogue TLS endpoint / MITM CA

Real-world references

Concrete public disclosures that match this vulnerability class: