Skip to main content

deventee.official@gmail.com

+92 325 512 2353

Back to all articles

Mobile App Security for Financial Services: Beyond the Compliance Checklist

PCI DSS, PSD2, and SOC 2 tell you what to protect. OWASP MASVS tells you how to test it. This guide covers both — plus the runtime protections that stop attacks the checklist cannot predict.

Kamran Mansoor

Kamran Mansoor

Founder & CEO

10 min read
Deventee editorial cover illustrating security & compliance: Mobile App Security for Financial Services: Beyond the Compliance Checklist
© 2026 Deventee. All rights reserved.Image Credit: Deventee

📋 Executive Summary & Key Takeaways

  • Compliance checklists (PCI DSS, PSD2, SOC 2) define what to protect. OWASP MASVS defines how to verify protection. You need both.
  • Certificate pinning prevents man-in-the-middle attacks but must include a rotation mechanism — a pinned cert that expires without a fallback bricks the app.
  • Runtime Application Self-Protection (RASP) detects jailbreak, debugging, instrumentation, and binary tampering at runtime — not at build time.
  • The threat model for a payment app is different from a banking app: payment apps handle card data transiently, banking apps hold persistent account access.
  • A security audit checklist is only useful if someone runs it on every release, not once before launch.

The Gap Between Compliance and Security

Passing a PCI DSS audit does not make your app secure. It means your app meets the minimum requirements for handling cardholder data. A determined attacker does not consult your compliance certificate before probing for vulnerabilities.

The gap between compliance and security is where real-world breaches happen. Compliance tells you to encrypt data at rest. Security engineering tells you which encryption algorithm, how to manage keys, what to do when a device is compromised, and how to detect that the encryption was bypassed at runtime.

This guide bridges that gap. We map regulatory requirements to engineering controls, provide implementation patterns, and give you the audit checklist that should run on every release.


Regulatory Mapping: What Each Standard Requires

RequirementPCI DSS v4.0PSD2 (EU)SOC 2 Type IIOWASP MASVS
Encrypt data at restReq 3.5Art. 95 (security measures)CC6.1MASVS-STORAGE
Encrypt data in transitReq 4.2Art. 95CC6.1MASVS-NETWORK
Strong customer authenticationN/AArt. 97 (SCA)CC6.1MASVS-AUTH
Secure key managementReq 3.6–3.7Implied by Art. 95CC6.1MASVS-CRYPTO
Access controlReq 7–8Art. 95CC6.2–CC6.3MASVS-AUTH
Logging and monitoringReq 10Art. 96 (incident reporting)CC7.1–CC7.3MASVS-RESILIENCE
Vulnerability managementReq 6.3ImpliedCC7.1MASVS-CODE
Tamper detectionReq 11.6Implied by SCACC7.2MASVS-RESILIENCE
Incident responseReq 12.10Art. 96 (72-hour notification)CC7.4Not in scope

OWASP MASVS Compliance Matrix for Fintech

MASVS organizes mobile security into categories. Here is how each maps to fintech requirements:

MASVS CategoryFintech RelevanceKey Controls
MASVS-STORAGECard data, tokens, PIINo sensitive data in plaintext files, logs, or backups. Keychain/Keystore for secrets.
MASVS-CRYPTOTransaction signing, token generationNo deprecated algorithms (MD5, SHA1, DES). Key derivation with PBKDF2 or Argon2. Hardware-backed keys where available.
MASVS-AUTHLogin, SCA, session managementBiometric + device binding. Session tokens expire. Re-authentication for sensitive operations.
MASVS-NETWORKAPI communication, payment processingTLS 1.2+. Certificate pinning. No cleartext traffic.
MASVS-PLATFORMOS-level integrationNo exported components leaking data. Deep link validation. Secure WebView configuration.
MASVS-CODEBinary protectionObfuscation. No debugging symbols in release builds. Dependency vulnerability scanning.
MASVS-RESILIENCEAnti-tamperingJailbreak detection. Debugger detection. Integrity checks. RASP.

Certificate Pinning: Implementation That Survives Rotation

Certificate pinning ensures the app only trusts specific server certificates, defeating man-in-the-middle attacks even when a compromised CA issues a fraudulent certificate.

Pin to Public Keys, Not Certificates

Certificates expire and rotate. Public keys can persist across certificate renewals if you reuse the key pair. Pin to the Subject Public Key Info (SPKI) hash:

plaintext
Certificate Pinning Strategy:
┌───────────────────────────────────┐
│  App ships with:                  │
│    Primary pin: sha256/AAAA...    │  ← Current server public key
│    Backup pin:  sha256/BBBB...    │  ← Next rotation key (pre-generated)
│    Emergency:   sha256/CCCC...    │  ← CA public key (last resort)
└───────────────────────────────────┘

Rotation flow:
  1. Generate new key pair (DDDD) on server
  2. Push DDDD as the new backup via config endpoint
  3. Renew certificate using the BBBB key pair
  4. App validates against BBBB (now primary)
  5. Old AAAA pin expires from app config

Conceptual Implementation (OkHttp / Android)

kotlin
#6a9955]">// Conceptual — adapt to your HTTP client and pin management strategy
val certificatePinner = CertificatePinner.Builder()
    .add(
        "api.example.com",
        "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",  #6a9955]">// Primary
        "sha256/BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB="   #6a9955]">// Backup
    )
    .build()

val client = OkHttpClient.Builder()
    .certificatePinner(certificatePinner)
    .build()

iOS: App Transport Security + TrustKit

On iOS, App Transport Security (ATS) enforces TLS by default. For pinning, use TrustKit or implement the URLSessionDelegate challenge handler with SPKI hash comparison.


Runtime Application Self-Protection (RASP)

Static security (obfuscation, encryption at rest) protects the app binary. Runtime protection detects and responds to attacks while the app is running.

RASP Protection Layers

plaintext
┌─────────────────────────────────────────────────┐
│                 App Binary                       │
├─────────────────────────────────────────────────┤
│  Layer 1: Environment Checks                     │
│    • Jailbreak / root detection                  │
│    • Emulator detection                          │
│    • Debugger detection (ptrace, sysctl)         │
├─────────────────────────────────────────────────┤
│  Layer 2: Integrity Checks                       │
│    • Binary signature verification               │
│    • Code segment hash validation                │
│    • Resource file integrity                     │
├─────────────────────────────────────────────────┤
│  Layer 3: Instrumentation Detection              │
│    • Frida detection (port scanning, artifacts)  │
│    • Xposed framework detection (Android)        │
│    • Method swizzling detection (iOS)            │
├─────────────────────────────────────────────────┤
│  Layer 4: Response                               │
│    • Block sensitive operations                  │
│    • Wipe local secrets                          │
│    • Alert server-side monitoring                │
│    • Graceful degradation (read-only mode)       │
└─────────────────────────────────────────────────┘

Jailbreak Detection Vectors (iOS)

No single check is reliable against sophisticated jailbreaks. Use multiple vectors:

plaintext
Detection vectors (check all, fail if any positive):
  1. File existence: /Applications/Cydia.app, /private/var/lib/apt
  2. URL scheme: Can the app open cydia:#6a9955]">// ?
  3. Sandbox escape: Can the app write to /private/ ?
  4. Fork behavior: Can the app call fork()? (blocked on stock iOS)
  5. Dylib injection: Are unexpected dynamic libraries loaded?
  6. Symbol resolution: Can the app resolve Substrate or libhooker symbols?

Root Detection Vectors (Android)

plaintext
Detection vectors:
  1. Binary existence: /system/xbin/su, /system/bin/su
  2. Build tags: Does Build.TAGS contain "test-keys"?
  3. Package presence: com.topjohnwu.magisk, eu.chainfire.supersu
  4. Property check: ro.debuggable = 1, ro.secure = 0
  5. Mount check: /system mounted as read-write
  6. SELinux status: Is SELinux in permissive mode?

Response Policy

Detection without response is a security log entry, not a security control. Define what happens when a compromised environment is detected:

Threat LevelDetectionResponse
LowEmulator detectedBlock in production builds; allow in debug
MediumJailbreak/root detectedDisable biometric auth, require PIN + OTP. Alert server.
HighDebugger attachedTerminate session. Wipe local tokens. Alert server.
CriticalBinary tampering detectedRefuse to launch. Wipe all local data. Report to fraud team.

Threat Model: Payment App vs. Banking App

The security profile differs by app type:

plaintext
Data flow:
  Card data → Tokenize (client-side, never store PAN) → Send token to payment processor

Key threats:
  • Man-in-the-middle capturing card data before tokenization
  • Screen overlay attacks capturing card entry
  • Memory scraping for card data in transit

Key controls:
  • Certificate pinning on tokenization endpoint
  • Secure input fields (disable screenshots, clipboard, autocomplete)
  • Memory wiping after tokenization completes
  • PCI DSS SAQ A-EP or SAQ D depending on integration model

Banking App (e.g., account management, transfers)

plaintext
Data flow:
  Persistent session → Account data, balances, transaction history → Transfers, payments

Key threats:
  • Session hijacking via token theft
  • Credential stuffing if password-only auth
  • Transaction tampering via MITM or local instrumentation
  • Social engineering via fake push notifications

Key controls:
  • Device binding (cryptographic key stored in Keychain/Keystore)
  • Transaction signing with device-bound key
  • Push notification verification (server-initiated challenge)
  • Session timeout with re-authentication for sensitive operations
  • PSD2 SCA for all payment initiation

Secure Data Storage

What Must Never Be Stored in Plaintext

DataStorage RulePlatform Mechanism
Card numbers (PAN)Never store. Tokenize immediately.N/A — do not persist
Authentication tokensEncrypted at rest, hardware-backediOS Keychain (kSecAttrAccessibleWhenUnlockedThisDeviceOnly), Android Keystore
Biometric templatesNever extracted from secure enclaveiOS Secure Enclave, Android StrongBox
User PIIEncrypted at restSQLCipher or platform encryption APIs
API keysNot in source code, not in app bundleFetched from server after authentication
Transaction logsEncrypted, time-limited retentionEncrypted local DB with TTL-based purge

Security Audit Checklist (Per Release)

Run this checklist before every production release, not just at launch:

Network Security

  • [ ] TLS 1.2+ enforced, no fallback to 1.0 or 1.1
  • [ ] Certificate pinning active with backup pins
  • [ ] No cleartext HTTP traffic (verify with network proxy)
  • [ ] API endpoints validate authentication on every request

Data Storage

  • [ ] No sensitive data in application logs (search for PAN patterns, tokens, passwords)
  • [ ] No sensitive data in app backups (Android: allowBackup=false, iOS: exclude from iCloud)
  • [ ] Tokens and secrets stored in Keychain/Keystore, not SharedPreferences/UserDefaults
  • [ ] Local database encrypted (SQLCipher or equivalent)

Authentication

  • [ ] Biometric authentication bound to device key, not just a UI gate
  • [ ] Session tokens expire and require re-authentication
  • [ ] Failed login attempts are rate-limited server-side
  • [ ] PSD2 SCA implemented for applicable transactions

Binary Protection

  • [ ] Code obfuscation applied (ProGuard/R8 for Android, bitcode + symbol stripping for iOS)
  • [ ] No debugging symbols in release builds
  • [ ] Third-party dependency vulnerability scan completed (no critical or high CVEs)

Runtime Protection

  • [ ] Jailbreak/root detection active with defined response policy
  • [ ] Debugger detection active
  • [ ] Integrity check on app binary at launch
  • [ ] Screenshot and screen recording disabled on sensitive screens

Compliance

  • [ ] PCI DSS self-assessment questionnaire (SAQ) reviewed for applicable scope
  • [ ] Data processing records updated for GDPR/privacy requirements
  • [ ] Incident response plan tested within the last 12 months
  • [ ] Penetration test completed within the last 12 months (or after major changes)

Common Mistakes in Fintech App Security

1. Treating Compliance as Security

PCI DSS Requirement 6.3 says to identify and manage vulnerabilities. It does not say how to detect Frida hooking your payment flow at runtime. Compliance is the floor, not the ceiling.

2. Certificate Pinning Without Rotation

A pinned certificate expires. If the app has no mechanism to update pins, every user is locked out until they update the app. Build a pin-update mechanism into the app from day one.

3. Client-Side-Only Validation

Never trust the client for security decisions. Jailbreak detection runs on the client and can be bypassed. The server must enforce transaction limits, authentication, and authorization independently of what the client reports.

4. Storing Card Data "Temporarily"

There is no temporary storage of PANs that is PCI-compliant without full PCI DSS certification. Tokenize card data at the point of capture using a PCI-certified payment processor's SDK. The card number should never exist in your application's memory longer than the time it takes to send it to the tokenization endpoint.

5. Skipping Security on Internal Builds

Debug builds with security disabled are the builds that get leaked, reverse-engineered, and used to map your API surface. Apply obfuscation and certificate pinning to all builds. Use feature flags, not build variants, to toggle debug capabilities.


The Bottom Line

Mobile app security in financial services is a layered discipline. Regulatory compliance (PCI DSS, PSD2, SOC 2) defines the boundaries. OWASP MASVS provides the verification framework. And runtime protections — certificate pinning, RASP, jailbreak detection, integrity checks — close the gap between what the checklist requires and what an attacker actually tries.

Run the audit checklist on every release. Test the runtime protections with real attack tools (Frida, objection, Burp Suite). And remember: the goal is not to pass an audit. The goal is to protect your users' money.

References & Further Reading

  • OWASP Mobile Application Security Verification Standard (MASVS) — OWASP (2024) View source
  • PCI DSS v4.0.1 — PCI Security Standards Council (2024) View source
  • NIST SP 800-163 Rev. 1: Vetting the Security of Mobile Applications — NIST (2019) View source
  • Revised Payment Services Directive (PSD2) — European Commission (2024) View source
Kamran Mansoor

Kamran Mansoor

Founder & CEO

Full-stack engineer and technical architect leading Deventee. Builds production software for logistics, healthcare, and fintech clients.

View Profile

Ready to improve your security & compliance workflow?

Turn this insight into a practical next step. Provide an authoritative single reference for mobile app security in financial services — covering both regulatory requirements and engineering implementation. Start with a focused conversation about your operation, constraints, and priorities.

Schedule a Call

Frequently Asked Questions

PCI DSS is a regulatory standard that defines requirements for protecting cardholder data — it tells you what must be protected. OWASP MASVS is a verification standard that defines how to test whether a mobile app is secure — it tells you how to verify protection. For a fintech app that handles card data, you need PCI DSS for compliance and MASVS for engineering assurance. They are complementary, not interchangeable.
Yes, but with a rotation mechanism. Certificate pinning prevents man-in-the-middle attacks by ensuring the app only communicates with servers presenting a known certificate or public key. The risk is that a pinned certificate that expires or is revoked without a fallback will make the app unable to connect. Implement pin rotation by pinning to the public key (not the certificate), including a backup pin, and using a network-reachable configuration endpoint to update pins without an app release.
Check for common indicators: the presence of files like /Applications/Cydia.app or /system/xbin/su, the ability to write to protected paths, the presence of hooking frameworks (Frida, Xposed), and whether the app can call fork() (blocked on stock iOS). No single check is conclusive — sophisticated jailbreaks hide these indicators. Use multiple detection vectors, obfuscate the detection logic, and decide on a response policy: block the app, disable sensitive features, or flag for enhanced monitoring.

Share

Have a complex software challenge?

Book a free 30-minute diagnostic session with our lead architects.

Schedule 30-Min Call