Exemple de rapport Mobile Agentic Deep Scan
MEDIUM 14. Certificate Pinning in TrafficActivity Silently Fails Due to Broad Exception Handling
Root Cause
The developer added certificate pinning using OkHttp's CertificatePinner.Builder, but wrapped the pinned request inside a broad exception handler that prints the stack trace instead of failing securely.
Vulnerable Code
TrafficActivity.java lines 147-148:
} catch (Exception e) {
e.printStackTrace();
}Exploitation Evidence
[Static Analysis] … The pinner then throws SSLPeerUnverifiedException, but the broad catch (Exception e) block at lines 147-148 silently swallows it.
Verification
- Intercept the https://owasp.org request in doPinning() using a proxy CA.
- Without the fix, the app silently logs the exception and shows no data.
- With the fix, the app must log a pinning failure and abort the connection, with no network request completing.
