Worried your app might leak customer data? The core mobile app security best practices are simple: follow OWASP’s MASVS, store little, encrypt traffic, verify on the server, and test before every release.
This guide is one part of the wider topic of mobile app strategy for business, where security sits next to cost, features and growth.
| Item | Value |
|---|---|
| OWASP Mobile Top Ten, last update (as cited in a January 2021 post) | 2016 |
| MASVS verification requirement groups | 8 (V1 to V8) |
| MASVS security levels | 2 levels (MASVS-L1 and MASVS-L2), plus MASVS-R |
| Android setting to keep data out of backups | android:allowBackup=false |
| iOS file protection setting for backups | NSFileProtectionComplete |
| MASTG Best Practices status | Still in beta (Appknox update of December 21, 2025) |
The figures come from Jscrambler’s MASVS and MSTG guide and Appknox’s MASTG checklist. Standards get revised, so check the sources and the current OWASP documents before you rely on them.
Start with the OWASP standards
The OWASP Mobile Application Security (MAS) project is led by a task force of industry leaders and mobile app security experts, as described in Guardsquare’s overview of the standards. It publishes security and privacy standards, a testing guide, a collection of app-specific weaknesses and a set of test cases.
Two documents do most of the work. The MASVS is the standard that says what a secure app must do, and the MSTG (also called the MASTG) is the manual that shows how to test for it.
Why not rely on the OWASP Mobile Top Ten alone? Jscrambler’s January 2021 post points out that it is a crowdsourced list of vulnerability categories that was last updated in 2016. Developers need standards to design against, and testers need predefined methods, which is the gap MASVS and MSTG fill.
What do the MASVS levels require?
As of Jscrambler’s January 2021 post, the standard defines two security levels and a separate reverse-engineering set. They are cumulative in spirit, so you pick the depth that fits your risk.
- MASVS-L1 holds generic security requirements recommended for all apps.
- MASVS-L2 adds requirements for defense-in-depth.
- MASVS-R is a set of reverse engineering requirements that provide client-side defenses.
In that same post, the requirements were grouped into eight areas, and V1 to V7 cover both L1 and L2:
- Architecture design and threat modeling
- Data storage and privacy
- Cryptography
- Authentication and session management
- Network communication
- Platform interaction
- Code quality and build settings
- Resilience
The post notes that enforcing a control depends on the business use case. A note-taking app and a banking app should not carry the same burden. The post drew on MASVS 1.2, so confirm the version OWASP publishes today.
Mobile app security starts with protecting data on the device
The first question is what you actually need to keep on the phone. The L1 requirements start by asking you to identify all sensitive data for the business case and to comply with relevant privacy laws, as Jscrambler’s guide lists them.
Anything you do not collect cannot leak. Appknox’s checklist adds that, with rules such as GDPR and CCPA, apps should apply strict data minimization and obtain explicit user consent.

For the data you do keep, the storage rules in the Jscrambler guide are practical and concrete:
- Save sensitive data with the system’s credential facilities, not in plain files.
- Keep it out of logs, third-party code (unless the architecture requires it), IPC mechanisms and the user interface.
- Disable the keyboard cache while handling sensitive data.
That third-party point matters for measurement. If your team uses mobile app analytics, keep personal and secret values out of event payloads.
Backups are a quiet leak. Appknox advises excluding sensitive information from backups with settings such as android:allowBackup=false on Android and NSFileProtectionComplete on iOS.
On cryptography, the Jscrambler guide says an app should not rely solely on symmetric cryptography with hardcoded keys, and should not reuse one key for several purposes. Appknox adds no homegrown crypto: rely on vetted libraries such as OpenSSL or CryptoKit, and use the platform’s secure random number APIs, such as Java’s SecureRandom or iOS’s SecRandomCopyBytes.
Secure sign-in, sessions and network traffic
The most important rule in this area is that authentication and authorization are performed on the remote endpoint. The Jscrambler guide also says security controls should be enforced on both the server and the client, so a modified app cannot simply skip a check.
If you build on a mobile backend as a service, the same rule applies: confirm that the server side enforces who can read and write what.
The L1 authentication requirements in that guide include:
- A password policy at the remote endpoint.
- Randomly generated session identifiers for stateful sessions.
- Stateless tokens signed with a secure algorithm.
- Sessions invalidated when tokens expire, and terminated remotely on logout.
- Endpoints configured to limit repeated login attempts.
For the network, the guide asks you to use TLS with recommended practices, verify the X.509 certificate on the remote endpoint and trust verified certificate authorities only.
Harden the platform interface and the build
Apps talk to the operating system, to other apps and to web content, and each door needs a lock. The Jscrambler guide lists the platform controls: manage permissions properly, sanitize external inputs such as data from external URLs and intents, and avoid exporting sensitive functionality.
If you use a WebView, the same guide says to disable JavaScript where you can and to restrict the protocols it may load.
The build is the last place where secrets slip out. Appknox’s checklist recommends several release steps:
- Remove logging code before release. Tools such as ProGuard in Android Studio can strip logging calls automatically.
- Use the latest Android or iOS signing methods to help prevent tampering.
- Disable debugging flags and WebView consoles before shipping.
Appknox describes the MASTG Best Practices as still in beta in its December 21, 2025 update, so treat them as an evolving list rather than a finished standard.
A short pre-release routine
- List the sensitive data the app handles and decide whether each item needs to be stored at all.
- Check storage, backups, logs and keyboard behaviour against the data rules above.
- Confirm that every sign-in and permission check is enforced on the server.
- Test the build against the MSTG test cases that match your chosen MASVS level.
- Strip logging and debug flags, then sign the release build.
Frequently asked questions
What is the difference between MASVS and MSTG?
Show answer
MASVS is the verification standard that lists what a secure mobile app must do. MSTG is the testing manual that shows how to check whether an app meets those requirements.
Is the OWASP Mobile Top Ten enough on its own?
Show answer
As Jscrambler’s January 2021 post explains, it is a crowdsourced list of vulnerability categories last updated in 2016. It helps with awareness, but it is not a design standard or a test method.
Do I need every MASVS control?
Show answer
Not necessarily. The standard has levels, and enforcing a control depends on the business use case. Start with L1 for every app and add L2 where the risk justifies it.
Where should authentication checks happen?
Show answer
On the remote endpoint. Client-side checks can be bypassed in a modified app, so the server must verify identity and permissions on every request.



