Mobile apps sit closer to us than almost any other software — they hold our messages, our money, our locations and our identities, and we carry them everywhere. That intimacy is exactly what makes them a target. And unlike a website, where all the code and data live safely on your servers, a mobile app hands a copy of itself to every single user, to run on a device you have no control over. An attacker can install your app, pull it apart, watch its traffic and probe its every assumption, entirely at their own pace.
The reassuring part is that most mobile breaches don't come from exotic techniques. They come from the same short list of well-understood weaknesses, repeated across app after app. This guide walks through those risks in depth — what each one is, how it's exploited, the real-world consequence, and the concrete fix — so you can build (or commission) an app that doesn't hand attackers the easy wins. Many of these overlap with the web risks in our OWASP Top 10 guide, because the app's backend is a web application in its own right.
The mental model: a mobile app has two halves — the code on the device and the API behind it — and both need defending. Teams often harden the visible app and forget the API, which is precisely where attackers go. Treat the device as hostile and the API as the real front line.
Why mobile security is different
Three properties set mobile apart from web security, and every risk below flows from them. First, the app runs in a hostile environment: the user's device may be old, rooted, jailbroken or infected, and you cannot assume it's clean. Second, the code is distributed: anyone can download your app and decompile it, so nothing shipped inside it is truly secret. Third, data goes local: apps cache and store information on the device for speed and offline use, creating a pool of data outside your servers entirely. Keep those three in mind and the specific vulnerabilities stop feeling like a random list and start looking like inevitable consequences you have to design around.
1. Insecure data storage
What it is: sensitive information — tokens, personal data, even passwords — stored on the device in a form that can be read if the device is compromised. Apps routinely save data in local databases, preference files and caches, and it's dangerously easy to leave that data in plain text.
How it's exploited: on a rooted or jailbroken phone, or a stolen one, an attacker browses the app's storage directly and reads whatever is there. They don't need to defeat your login screen if the session token is sitting unprotected in a file. Forensic tools make this trivial.
The impact: account takeover, exposure of personal and financial data, and — if you stored other users' data locally — a much wider breach than one device.
The fix: minimise what you store on the device in the first place; if you don't need it locally, don't keep it there. For what must be stored, use the platform's secure storage — the iOS Keychain and Android Keystore — which encrypt data and tie it to the device and user. Never write credentials or secrets to plain files, logs or unencrypted databases.
2. Insecure communication
What it is: data travelling between the app and its backend without proper encryption, or with encryption that can be bypassed.
How it's exploited: an attacker on the same network — a coffee-shop Wi-Fi, a malicious hotspot — intercepts the traffic. If it isn't encrypted, they read everything. Even with HTTPS, a determined attacker may try a man-in-the-middle attack, presenting a fake certificate to sit invisibly between the app and your server.
The impact: credentials, tokens and personal data captured in transit, and traffic silently manipulated.
The fix: use HTTPS for absolutely everything, with modern TLS — no exceptions for "internal" or "test" endpoints. For sensitive apps, add certificate pinning, so the app only trusts your specific certificate and rejects the fake ones used in man-in-the-middle attacks. And never disable certificate validation to make development easier and then forget to turn it back on — a shockingly common cause of real incidents.
3. Weak authentication & session handling
What it is: flaws in how the app verifies who a user is and maintains that trust — weak login flows, tokens that never expire, or authentication logic the app performs locally and the server never re-checks.
How it's exploited: attackers target the weakest link: a login with no rate limiting invites brute-force and credential-stuffing; a token that lives forever, once stolen, is a permanent key; and any check performed only in the app can be bypassed entirely by calling the API directly.
The impact: account takeover at scale, and impersonation of other users.
The fix: enforce strong authentication with multi-factor where the stakes justify it, offer biometric unlock backed by the platform's secure hardware, rate-limit login attempts, and give tokens sensible lifetimes with proper refresh and revocation. Above all, enforce every authentication and authorisation decision on the server — the app is a convenience, never the security boundary.
The recurring root cause: trusting the app. Anything the app checks, an attacker can skip by talking to your API directly. Client-side validation is for user experience; server-side validation is for security. Never confuse the two.
4. Insufficient cryptography
What it is: using weak, broken or badly-implemented encryption — outdated algorithms, home-made schemes, or hard-coded keys shipped inside the app.
How it's exploited: because your app's code is distributed to everyone, an attacker can decompile it and find any key or secret baked in. Weak algorithms can be broken outright, and a custom "encryption" scheme almost always has a flaw a specialist will find quickly.
The impact: supposedly protected data turns out to be readable, giving a false sense of security that's often worse than none.
The fix: use well-established, standard cryptographic libraries and algorithms — never invent your own. Keep keys off the device where possible, and where they must be present, protect them with the platform's secure hardware (Keychain / Keystore). Treat any secret shipped inside the app binary as effectively public, because to a motivated attacker it is.
5. Insecure APIs & backend
What it is: weaknesses in the server-side API that powers the app — the single most common source of serious mobile breaches, and the most under-appreciated.
How it's exploited: attackers ignore your carefully designed app entirely and call the API directly, using ordinary tools. If the API assumes "only our app will call this" and skips proper authentication, authorisation or input validation, it's wide open. Broken access control here — returning another user's data because the API doesn't check ownership — is devastating and extremely common.
The impact: mass data exposure, account takeover, and manipulation of the whole system behind the app.
The fix: treat the API as a public web application, because it effectively is one. Authenticate and authorise every request server-side, validate all input, enforce ownership checks on every object, and rate-limit. Everything in our web security best practices applies here directly — the API is where your real security lives.
6. Reverse engineering & code tampering
What it is: attackers decompiling your app to understand how it works, find secrets, or produce a modified version — repackaging it with malware, or bypassing checks like licensing or in-app purchases.
How it's exploited: readily available tools turn a downloaded app back into readable code. From there an attacker learns your logic, harvests any embedded secrets or API details, and can distribute a tampered clone through unofficial channels.
The impact: exposure of internal logic and secrets, fraud through modified apps, and malware distributed under your name.
The fix: accept that you can't fully prevent reverse engineering, so design as if the attacker can read your code — keep no secrets in the app and enforce all real logic server-side. Then raise the effort: use code obfuscation, and for high-value apps add anti-tampering and root/jailbreak detection so a modified or compromised environment can be refused or limited.
7. Excessive permissions
What it is: an app requesting access to far more than it needs — contacts, location, camera, storage — often out of convenience or over-cautious "we might need it later" thinking.
How it's exploited: every granted permission is extra surface. If the app is compromised, those permissions become the attacker's; and excessive data collection is itself a privacy and compliance liability, quite apart from any breach.
The impact: a bigger blast radius if compromised, eroded user trust, and regulatory exposure.
The fix: follow least privilege — request only the permissions a feature genuinely needs, ask for them in context (when the feature is used, not all at once on launch), and collect the minimum data required. Less access and less stored data mean less to lose.
Testing & the shared-responsibility model
Reading this list is a start; proving your app holds up is the finish. Mobile security is a shared responsibility across three layers — the app on the device, the network in between, and the backend API — and a weakness in any one undermines the others. Automated app-store checks catch only the most obvious issues; they won't inspect your local storage, watch your traffic, or probe your API's access control.
That's the job of a mobile-focused penetration test, which examines all three layers the way a real attacker would — decompiling the app, inspecting what it stores, intercepting its communication, and hammering the API directly. Security also can't be a one-time gate: as an app grows and starts handling accounts, payments and more sensitive data, its defences must grow with it, and for a workforce-scale app the stakes rise further still, as we cover in building a mobile app for 10,000+ employees.