Key takeaway
Mobile apps that handle ePHI should store as little PHI on the device as possible, protect what remains with platform keystores and file protection, keep PHI out of push notifications, logs, screenshots and backups, use biometrics only as a local unlock for credentials held in secure hardware, and enforce strong TLS. OWASP MASVS provides a verification baseline; HIPAA itself does not prescribe mobile-specific controls, so the risk analysis decides how far to go.
Last reviewed November 17, 2026
Use OWASP MASVS and MASTG as the baseline
OWASP MASVS defines security requirements for mobile apps in control groups, and the MASTG describes how to test them. They are not HIPAA requirements, but they translate the Security Rule's technical safeguards into concrete, testable mobile controls and are widely recognized by security reviewers.
| MASVS control group | What it covers | Healthcare example |
|---|---|---|
| MASVS-STORAGE | Secure storage of sensitive data on the device | Visit summaries cached for offline use are encrypted and excluded from backups |
| MASVS-CRYPTO | Correct use of cryptography and key management | Keys generated in the Secure Enclave or Android Keystore, never hard-coded |
| MASVS-AUTH | Authentication and session management | Short-lived access tokens, server-side session revocation, re-authentication for sensitive actions |
| MASVS-NETWORK | Secure network communication | TLS 1.2 or later, no cleartext traffic, correct certificate validation |
| MASVS-PLATFORM | Safe interaction with the OS and other apps | Deep links validated, no PHI exposed through shared intents or pasteboard |
| MASVS-CODE | Code quality, dependencies and input handling | Third-party SDKs reviewed for data collection; dependencies kept current |
| MASVS-RESILIENCE | Resistance to reverse engineering and tampering | Jailbreak or root signals used for risk decisions where justified |
| MASVS-PRIVACY | Privacy controls and data minimization | No PHI sent to analytics SDKs; clear disclosures in store privacy labels |
Store as little PHI on the device as possible
The safest PHI is the PHI that never reaches the device's storage. Fetch data on demand, keep it in memory while displayed and clear it when the user leaves the screen or the session ends. Where offline access is a genuine clinical need, store the minimum set and protect it.
Keychain and Keystore for secrets
Store refresh tokens and encryption keys in the iOS Keychain with an appropriate accessibility class, or in Android Keystore-backed storage. Never in UserDefaults, SharedPreferences or plain files.
File protection
On iOS, use Data Protection classes such as complete protection for PHI files. On Android, encrypt files with a Keystore-managed key in app-private storage.
Exclude from backups
Mark PHI caches as excluded from iCloud and device backups, and configure Android backup rules so PHI is not copied to cloud backups.
Clear on logout
Logout and remote session revocation wipe caches, databases, tokens and downloaded documents.
Keep PHI out of push notifications and the lock screen
Push notifications travel through Apple Push Notification service or Firebase Cloud Messaging and appear on lock screens and paired wearables. A notification that reads 'Your HIV test result is ready' discloses PHI to anyone who glances at the phone. Treat notification content as public.
Send generic text such as 'You have a new message in your care app' and fetch details only after the user opens and authenticates in the app. Avoid PHI in notification payload data fields as well, since they pass through infrastructure outside your BAAs and may be logged.
Screenshots, the app switcher and screen recording
Both platforms capture a snapshot of the app's screen when it moves to the background so the app switcher can display it. If a lab result is on screen, that snapshot can show it to anyone who opens the switcher, and the system may cache it.
- iOS: cover sensitive views with a privacy screen when the app resigns active, so the snapshot shows a neutral image. iOS does not let apps block user screenshots, but apps can detect screen capture and hide sensitive content during recording or mirroring.
- Android: set FLAG_SECURE on activities that display PHI to block screenshots, screen recording and app switcher previews. Weigh this against accessibility and user expectations, since some patients want to screenshot instructions.
- Disable keyboard caching and autocorrect learning on fields that capture sensitive free text where the platform allows.
- Clear sensitive data from the pasteboard or restrict copying in high-risk views.
Biometrics as a local unlock, not an identity
Face ID, Touch ID and Android biometrics confirm that the person holding the device is an enrolled user of that device. They do not prove identity to your server, and the biometric data never leaves the device's secure hardware.
The right pattern is to use the biometric prompt to unlock a credential stored in the Keychain or Keystore with a biometric access control, such as a refresh token or a private key, which the app then uses to authenticate to the server. On Android, bind the prompt to a cryptographic operation rather than treating a success callback as proof. Re-require full sign-in when biometrics change, after a period of inactivity, and for high-risk actions.
Network security and certificate pinning trade-offs
Transmission security (164.312(e)) is addressable, but in practice every mobile app should use TLS 1.2 or later for all traffic, disable cleartext with App Transport Security and Android network security configuration, and never ship code that disables certificate validation for debugging.
Certificate or public key pinning adds protection against interception by a rogue or compromised certificate authority, and some enterprise customers ask for it. The trade-off is operational: if a pinned key rotates unexpectedly, every installed app fails to connect until users update. If you pin, pin to public keys rather than leaf certificates, include backup pins, plan rotation well in advance and have a tested recovery path. OWASP guidance treats pinning as a defense-in-depth measure rather than a universal requirement.
Offline caching and sync
Clinicians in rural areas or hospital basements may need offline access; home care and RPM apps often queue readings when connectivity drops. Offline support is legitimate, but it moves PHI onto the device for longer.
- 1
Justify the offline data set
Document which data must be available offline and for how long, in the risk analysis.
- 2
Encrypt the local store
Use an encrypted database with a key held in the Keychain or Keystore and bound to device unlock.
- 3
Limit lifetime
Expire cached PHI after a defined period and on logout, and cap how long the app runs offline before requiring re-authentication.
- 4
Sync safely
Sign or validate queued writes, resolve conflicts on the server and record audit events when sync completes.
MDM, BYOD and workforce devices
Clinician apps often run on personal phones. Health systems typically manage this with mobile device management or app-level management (MAM) policies that enforce a device passcode, encryption, OS version minimums, remote wipe of app data and restrictions on copying data to unmanaged apps.
Our approach is to support the customer's management tools, such as app configuration and app protection policies, rather than building custom device controls. Patient-facing apps cannot rely on MDM, so they must enforce their own session timeouts, local protections and server-side revocation.
What HIPAA requires versus what mobile best practice adds
HIPAA requirement
What the rules themselves require
- Unique user identification and person or entity authentication for users accessing ePHI (164.312(a)(2)(i), 164.312(d)).
- Assessment of automatic logoff and encryption as addressable specifications (164.312(a)(2)(iii)-(iv)).
- Assessment of transmission security for ePHI in transit (164.312(e)).
- BAAs with any vendor whose SDK or service receives ePHI.
Recommended practice
Widely accepted security practice
- OWASP MASVS verification and MASTG-based testing before release.
- Keychain or Keystore storage for tokens and keys; encrypted local stores for any cached PHI.
- PHI-free push notifications, app switcher privacy screens and backup exclusion.
Architecture decision
Depends on your product and risk analysis
- Certificate or public key pinning, with a rotation plan.
- Jailbreak and root detection used as a risk signal.
- Offline mode, depending on clinical need documented in the risk analysis.
Your organization's responsibility
Policies and operations software cannot do
- Device policies for workforce phones, including MDM or MAM enrollment.
- Workforce training on lost device reporting and acceptable use.
- Incident response procedures for lost or stolen devices, including remote wipe.
Frequently Asked Questions
Can push notifications contain PHI?
They should not. Push services from Apple and Google are outside your BAAs, and notifications appear on lock screens and wearables. Use generic text and show details only after the user opens and authenticates in the app.
Is Face ID or fingerprint login HIPAA compliant?
Biometrics can be part of a compliant design when used as a local unlock for a credential stored in secure hardware. The biometric itself stays on the device. Your server still authenticates the user through tokens or keys, and you should require full sign-in periodically and after biometric changes.
Is certificate pinning required for HIPAA?
No. HIPAA requires you to assess transmission security, and TLS with correct certificate validation is the baseline. Pinning is an optional defense-in-depth measure with real operational risk if keys rotate unexpectedly.
Can a healthcare app store PHI offline?
Yes, if the risk analysis justifies it. Store the minimum data, encrypt it with a key held in the Keychain or Keystore, exclude it from backups, expire it after a defined period and wipe it on logout.
What is OWASP MASVS?
The OWASP Mobile Application Security Verification Standard is a set of security requirements for mobile apps grouped into areas such as storage, cryptography, authentication, network, platform, code, resilience and privacy. The companion MASTG explains how to test them.
Should a healthcare app block screenshots?
On Android, FLAG_SECURE can block screenshots and app switcher previews on screens that show PHI. iOS does not allow blocking screenshots, but apps can obscure the app switcher snapshot and hide content during screen recording. Balance this against accessibility needs.
Can I use analytics SDKs in a HIPAA-compliant mobile app?
Only if they never receive PHI or the vendor signs a BAA. In a health app, screen names, events and identifiers can be PHI, so disable automatic capture and send only non-PHI events, or choose a vendor that signs a BAA.