Skip to content

OWASP MASVS in practice: mobile app security requirements

B2Bnetwork team · · 6 min

Security

In brief

OWASP MASVS works best as a list of requirements from day one of the project, not as a test at the end. In practice you choose a profile based on the app's risk (for example L1 with P for a field service app, L2 with P for an app with health data), write the selected controls into the vendor contract and into the acceptance criteria of user stories, check some of them automatically on every build, and order a manual test following the MASTG guide before the first release.

What MASVS is and what to expect from it

MASVS (Mobile Application Security Verification Standard) is the OWASP standard of security requirements for iOS and Android apps. Since version 2 it has 24 controls in eight groups: STORAGE, CRYPTO, AUTH, NETWORK, PLATFORM, CODE, RESILIENCE and PRIVACY. The controls are deliberately general. For example, MASVS-STORAGE-1 requires the app to store sensitive data securely, whether it lands in the app's private storage or in shared locations. How to verify this on each platform is described in a separate guide, MASTG.

This leads to a practical rule: MASVS says what must be achieved, and your team has to turn that into specific decisions for this app. This article describes that translation for a company building its own app for field technicians, sales reps, store customers or patients. A full MASVS test of a banking app is described in Mobile banking app security testing with OWASP MASVS.

Choosing a profile by risk

Since version 2, MASVS has no levels. They were replaced by MAS testing profiles: L1 (baseline security), L2 (defense in depth for apps with sensitive data), R (resilience against analysis and tampering) and P (privacy). Profiles are combined. An example selection for apps outside banking:

AppData and operationsExample profileReasoning
a product catalog for customerspublic data, a loyalty accountL1 + Plittle sensitive data, but there is a customer account
a field service appcustomer addresses, photos of equipment, offline workL1 + P, with selected L2 controls for offline dataphones get lost with customer data on board
a B2B ordering appcustomer-specific prices, credit limitsL2 + Pcommercial data and the ability to place orders
a medical apprecords, test results, videoL2 + Pspecial category data under the GDPR
an app with payments or vouchers worth moneyfinancial operations, logic in the appL2 + P + Rmodifying the app to bypass limits pays off

This is a starting point, not a rule. The profile comes from the threat model: who might want to attack the app, what they would gain and what data sits on the device. The method is described in Threat modeling with STRIDE.

From control to acceptance criterion

A MASVS control on its own does not work in a backlog, because nobody knows when it is "done". An acceptance criterion written for a specific feature does. An example for a field service app:

MASVS controlWhat it means in this appAcceptance criterion
STORAGE-1offline jobs with customer addressesjob data in a database encrypted with a key from the system keystore, deleted after sync and job closure
STORAGE-2photos of equipment at the customer's sitephotos do not go to the phone's gallery or to cloud backup
AUTH-1technician sign-insign-in through the company identity provider, session token valid for one shift
NETWORK-1sending the visit reportTLS only, the app rejects certificates from outside trusted authorities
PLATFORM-2service manuals in a WebViewthe WebView loads only allowlisted URLs, with no access to local files
CODE-2an old version with a bugthe server refuses versions below the minimum and the app asks the user to update
PRIVACY-1the technician's locationlocation is collected only while a job is open, not in the background

The table goes into the specification, and each criterion into the user story it applies to. The tester checks it at acceptance like any other requirement. General principles of testing across many devices are covered in Mobile app testing.

MASVS in the vendor contract

When an external team builds the app, MASVS gives both sides a common language for the contract. It is worth including:

  1. The chosen profile and list of controls, with any exclusions and the reasons for them.
  2. Evidence at acceptance: scan results from the pipeline, a list of libraries with versions (SBOM), a description of how data is stored on the device.
  3. An independent test before the first release, done by a different company from the vendor, with a retest of fixes.
  4. Fix deadlines by severity, also after go-live, for the duration of maintenance.
  5. API security, because most data and decisions live on the server. A MASVS-compliant app with a leaky API protects nothing, as described in API security.

What to check automatically and what by hand

CheckWhereWhat it catches
dependency and license scanCI pipeline on every buildlibraries with known vulnerabilities (CODE-3)
static analysis of the package, for example MobSFCI pipeline on the release buildpermissions, debug flags, stored keys, network settings
secret scannerrepository and pipelineAPI keys hard-coded in the app
manual test following MASTGbefore the first release and after major changesauthentication logic, real-world data storage, bypassing protections
API testtogether with the manual testaccess control to other users' data

Static analysis of the package is good at catching configuration mistakes, but it will not tell you whether a token still works on the server after sign-out. That takes an engineer with a test device and traffic inspection tools.

It helps if the app records security events on the server side from the start: sign-ins, access denials, device changes. What to log and what not to log is covered in Security event logging in applications. B2Bnetwork engineers test mobile apps against MASVS and MASTG as part of Security testing, together with the API and the admin panel. A similar scope was covered in the case study on security testing a telemedicine app.

Questions and answers

Does every mobile app have to meet all MASVS controls?

No. MASVS itself expects the profile to match the risk. A product catalog app does not need tamper protection, while a medical app needs strong protection of data on the device. What matters is that exclusions are deliberate and written down with a reason, not the result of nobody thinking about them.

How much does it cost to bring an app in line with MASVS?

It depends on when you start. Requirements written into the specification before development cost little, because the team chooses the keystore, the sign-in method and data storage from the outset. Retrofitting a finished app can be expensive when the architecture has to change, for example moving logic from the app to the server.

Can an app built with Flutter or React Native meet MASVS?

Yes. MASVS describes requirements, not technology. With cross-platform frameworks you need to check how libraries store data and whether they use the system keystore on both platforms. The manual test then also covers the native layer the framework relies on.

Does MASVS help with the GDPR?

The PRIVACY group covers data minimization, preventing identification of the user, transparency and user control over data, which supports data protection by design under Article 25 of the GDPR. MASVS does not replace a legal analysis, a lawful basis for processing or an impact assessment when the app processes special category data.

What it looks like in a project

Want to check your application's security? Talk to an engineer.

Let's talk

Read more: Security

All in Security →