What Is Mobile Application Security? Risks, Rules and Testing
Mobile application security is protecting apps and their data on a device the attacker may fully control. The recurring risks are hardcoded secrets, insecure local storage, weak transport protection and unprotected backend APIs. Test against the OWASP MASVS, which has eight control groups, and remember that most serious findings are in the API rather than the app.
Topic: Web & API Security in Cybersecurity & Ethical Hacking · Explainer
Quick answer: Mobile application security is protecting apps and their data on a device the attacker may fully control. The recurring risks are hardcoded secrets, insecure local storage, weak transport protection and unprotected backend APIs. Test against the OWASP MASVS, which has eight control groups, and remember that most serious findings are in the API rather than the app. If the app handles payments in India, the RBI prescribes specific controls, including device binding, re-authentication on every launch and retiring old versions within six months.
Key takeaways
- The device may be fully controlled by the attacker, so nothing shipped in the app is secret and no check performed on the device is binding.
- Many mobile findings are backend API weaknesses. Test the API directly, without the app, because that removes every constraint the developer assumed.
- Android has blocked cleartext traffic by default since Android 9 (API level 28), and has stopped trusting the user-added CA store for apps targeting API 24 and above.
- Certificate pinning needs a backup key and should not be given an expiry date, because an expired pin set stops pinning.
- Indian payment apps have prescribed controls: device binding, re-authentication on each launch, no stored authentication data, and a published checksum of the current version.
Topics covered in this guide: mobile application security, the OWASP MASVS and Mobile Top 10, insecure data storage, mobile API security, platform transport defaults, certificate pinning, RBI requirements for payment apps, and how mobile apps are tested.
Table of Contents
- What Is Mobile Application Security?
- Why Is Mobile Different From Web Security?
- What Standard Should You Test Against?
- What Are the Most Common Mobile Security Risks?
- Why Is Hardcoding Secrets Such a Problem?
- What Is Insecure Data Storage?
- How Do Backend APIs Fit In?
- What Does the Platform Already Do for You?
- What Is Certificate Pinning and Should You Use It?
- What Does Indian Regulation Require of a Payment App?
- How Is Mobile Application Security Tested?
- What Should Developers Do Differently?
- How Does This Relate to Device Management?
- References
What Is Mobile Application Security?
Mobile application security is the practice of protecting mobile apps and the data they handle from misuse, covering the application on the device, the backend services it calls, and the communication between them.
The scope frequently surprises people. A large share of mobile findings are backend API weaknesses rather than problems in the app itself, because the app is the visible client of a service that has to defend itself independently.
Why Is Mobile Different From Web Security?
Because the application runs on hardware the user, and potentially an attacker, controls completely. Anything shipped in the app can be extracted, and any check performed on the device can be bypassed by modifying the app or the environment it runs in.
This invalidates the client-side trust assumption. A web application at least runs partly on infrastructure you control. A mobile app runs entirely on someone else's device, where it can be decompiled, instrumented and modified.
The practical rule that follows: never rely on the app to enforce anything security-critical. Every check that matters must be repeated and enforced on the server.
What Standard Should You Test Against?
The OWASP Mobile Application Security Verification Standard, usually written MASVS. It replaces the habit of testing against whatever the tester happens to know with eight named control groups, each of which produces a list of things to verify.
| Group | What it covers |
|---|---|
| MASVS-STORAGE | Storage |
| MASVS-CRYPTO | Cryptography |
| MASVS-AUTH | Authentication and Authorization |
| MASVS-NETWORK | Network Communication |
| MASVS-PLATFORM | Platform Interaction |
| MASVS-CODE | Code Quality |
| MASVS-RESILIENCE | Resilience Against Reverse Engineering and Tampering |
| MASVS-PRIVACY | Privacy |
MASVS is paired with the Mobile Application Security Testing Guide, which gives the test cases, so a report written against MASVS can be checked by somebody who did not run the test. The companion list is the OWASP Mobile Top 10, whose 2024 release reads: M1 Improper Credential Usage, M2 Inadequate Supply Chain Security, M3 Insecure Authentication/Authorization, M4 Insufficient Input/Output Validation, M5 Insecure Communication, M6 Inadequate Privacy Controls, M7 Insufficient Binary Protections, M8 Security Misconfiguration, M9 Insecure Data Storage, M10 Insufficient Cryptography.
Two of those are worth noticing because they are new ground for most mobile teams. M2 is supply chain, which on mobile means the advertising, analytics and crash-reporting libraries you did not write and cannot easily audit. M6 is privacy, which is now a control group of its own in MASVS as well.
What Are the Most Common Mobile Security Risks?
The recurring issues are insecure data storage on the device, weak or missing authentication and authorisation on backend APIs, insufficient transport protection, hardcoded secrets, insecure inter-app communication, and inadequate protection against reverse engineering where it matters.
- Insecure local storage - credentials or personal data written unprotected
- Weak API authorisation - the server trusting requests it should verify
- Transport weaknesses - improper certificate validation
- Hardcoded secrets - API keys embedded in the app and easily extracted
- Excessive permissions - requesting more device access than the function needs
- Insecure inter-app channels - components exposed to other applications
Why Is Hardcoding Secrets Such a Problem?
Because anything in the application package can be extracted. Decompiling an app and searching for keys is straightforward, and embedded API keys, credentials or encryption keys should be treated as public the moment the app ships.
The correct pattern is that secrets live on the server, and the app authenticates as a user rather than carrying a shared credential. Where an app genuinely needs a key, it should be scoped narrowly enough that extraction is not catastrophic.
This is M1 in the 2024 Mobile Top 10, and it is first on that list for a reason: it is the single finding that most reliably turns one compromised app into access to a backend.
What Is Insecure Data Storage?
It is storing sensitive information on the device without adequate protection, such as credentials in plain text preferences, personal data in unprotected databases, or sensitive content written to logs and caches.
Both platforms provide a dedicated facility for this. Android has the Keystore system for keys and credentials, and iOS has the Keychain. The common failure is using ordinary storage because it is less work.
Logs deserve particular attention. Debug logging that writes tokens or personal data is easy to leave enabled in a release build, and it is a frequent finding in assessments. Android's own documentation makes the related point about debug builds in general: debug trust overrides apply only when the app is marked debuggable, and "as a security precaution, app stores do not accept apps that are marked debuggable". A release build that still logs tokens passes that check and leaks anyway.
How Do Backend APIs Fit In?
They are usually where the real risk sits. Because the app cannot be trusted, the API must independently authenticate every request, authorise every action against the requesting user, and validate all input as though it came from an attacker.
The classic mobile finding is an API that returns another user's data when the identifier in the request is changed. The app never offers that option, so the developer assumed nobody could ask for it, which is the first assumption an attacker tests. That is broken access control, and our guide to API security covers the server side of it.
What Does the Platform Already Do for You?
More than most articles on this subject admit, and knowing the defaults tells you which findings are real and which are a tester reporting the absence of something the platform already handles.
| Behaviour | Android default | Source |
|---|---|---|
| Cleartext HTTP traffic | Enabled up to Android 8.1 (API 27); disabled from Android 9 (API 28) | Network Security Configuration |
| User-added CA store trusted | Only for apps targeting Android 6.0 (API 23) and lower | Network Security Configuration |
| Certificate Transparency | Unavailable on API 35 and lower; off by default on API 36; on by default from API 37 | Network Security Configuration |
| Minimum target API to ship | API 36 for new apps and updates from 31 August 2026 | Google Play requirements |
The second row explains a question testers are asked constantly. Installing a proxy certificate into the user CA store and watching the traffic flow works on apps that target API 23 or lower, and stops working above that unless the app opts in. A modern app whose traffic you can read without touching the binary has usually been configured to allow it.
The last row is a control, even though it reads like a store policy. Under Google Play's target API requirements, "New apps and app updates must target Android 16 (API level 36) or higher to be submitted to Google Play" from 31 August 2026, with an extension available to 1 November 2026. An app that cannot be updated is an app whose vulnerabilities are permanent, which is why MASVS-CODE covers keeping the app current alongside secure data processing.
What Is Certificate Pinning and Should You Use It?
Certificate pinning restricts an app to a specific set of certificates, so interception fails even for somebody who controls the device's trust store. On Android it is configured declaratively: pins are supplied as the base64 SHA-256 digest of the certificate's SubjectPublicKeyInfo, and a chain is valid only if it contains one of the pinned public keys.
Three details decide whether a pinning implementation helps or hurts.
- Always ship a backup key. Android's documentation is direct about this: "you should always include a backup key so that if you are forced to switch to new keys or change CAs, your app's connectivity is unaffected". Without one, a certificate change means every installed copy of the app loses connectivity until it is updated.
- Think hard before setting an expiry. A pin set can carry an expiration date, after which pinning stops. That protects users who never update the app, and the documentation states the cost plainly: "setting an expiration time on pins may enable attackers to bypass your pinned certificates."
- It is an obstacle, not a guarantee. On a device the attacker fully controls, pinning can be patched out of the binary. It raises the cost of casual interception and does not change the rule that the server must enforce everything that matters.
Pinning also obstructs legitimate testing, so build a way to disable it in test builds rather than leaving the tester to patch the app.
What Does Indian Regulation Require of a Payment App?
If the app handles payments in India, a good deal of this stops being best practice and becomes prescribed. The Reserve Bank's Digital Payment Security Controls Directions set out specific mobile application controls, and the 2026 directions for non-banking financial companies state them in Chapter V, paragraph 68.
| Requirement | Provision |
|---|---|
| Device binding of the mobile application, with notification of each new device registration and the ability to disable registered devices | 68(6) |
| Re-authentication whenever the device or application remains unused, and on each launch | 68(8) |
| No storing or retaining of sensitive personal or customer authentication information, and sensitive data wiped from memory when the user exits | 68(10) |
| A published checksum of the current app version, so a user can verify what they installed | 68(5) |
| Older app versions deactivated in a phased but time-bound manner, not exceeding six months from the newer release | 68(2)(iii) |
| Minimal data collection and app permissions | 68(2)(vii) |
| Identification of remote access applications, to the extent possible, and prohibition of login while one is present | 68(2)(iv) |
| Code obfuscation, listed as an illustrative control | 68(2)(ix) |
Two of these are worth dwelling on. The six-month retirement rule means an app with three live versions in the field is out of compliance as well as hard to secure, and it is the provision teams most often discover late. And the remote access provision addresses a fraud pattern rather than a vulnerability: a victim is talked into installing a screen-sharing app and then into opening their banking app while the fraudster watches. No amount of storage encryption helps there, which is why the control is detection and refusal rather than protection.
For banks, small finance banks, payments banks and credit card issuing NBFCs, the original framework is the Master Direction on Digital Payment Security Controls of 18 February 2021, and parallel 2026 directions now exist by entity type. Check which set applies to the entity you are building for rather than assuming the version you read last.
How Is Mobile Application Security Tested?
Testing combines static analysis of the application package, dynamic analysis of the running app with traffic interception, examination of local storage after use, and thorough testing of the backend API independently of the app.
- Static analysis - decompile and inspect for secrets and weak logic
- Traffic interception - observe and modify API calls
- Local storage review - inspect what the app wrote to the device
- API testing - test the backend directly, bypassing the app entirely
- Platform checks - permissions, exported components, certificate handling
Testing the API without the app is the step that finds the most serious issues, because it removes every client-side constraint the developer implicitly relied on. Our mobile app pentesting guide covers the methodology, mobile app pentesting tools covers the toolset, and Drozer covers exported component testing on Android specifically.
What Should Developers Do Differently?
Enforce all security decisions server-side, use platform secure storage for anything sensitive, never embed secrets, validate certificates properly, request minimum permissions, disable debug logging in release builds, and test the API as a hostile client.
- Server-side enforcement - the device cannot be trusted, ever
- Platform secure storage - Android Keystore or iOS Keychain for credentials, tokens and keys
- No embedded secrets - treat anything shipped as public
- Minimum permissions - request only what the function requires
- Clean release builds - no debug logging, no test endpoints, not debuggable
- A current target API - so platform defaults apply and the app stays shippable
Our guide to web application security tools covers why automation rarely finds authorisation flaws, which is the class of defect this list cannot fix on its own.
How Does This Relate to Device Management?
Application security protects the app and its data. Mobile device management protects the device and controls which apps may reach corporate resources. They address different layers, and an organisation handling sensitive data generally needs both. Our guide to mobile device management covers the device layer, including the difference between managing a whole device and managing only corporate applications on it.
The RBI provisions above sit across that boundary, which is worth noticing. Device binding and remote access detection are application controls that exist because the device cannot be managed.
Talk to a WebAsha training advisor about batches, syllabus and current fees.
References
- OWASP Mobile Application Security Verification Standard
- OWASP Mobile Application Security Testing Guide
- OWASP Mobile Top 10, 2024 release
- Android Network Security Configuration
- Google Play target API level requirements
- Reserve Bank of India (Non-Banking Financial Companies - Digital Payment Security Controls) Directions, 2026, RBI/DoS/2026-27/462, 31 July 2026
- Master Direction on Digital Payment Security Controls, RBI/2020-21/74, 18 February 2021
Related reading
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0