Five Mobile App Security Vulnerabilities a Scan Finds — and Nobody Chose

A security scan on a perfectly working mobile app turns up five findings. Every one is a default or a testing leftover, not a mistake — here is the fix for each.

Suthahar Jegatheesan By Suthahar Jegatheesan Published

Azure 5 min read —views
Article banner. On the left, the eyebrow "Azure, Securing a Mobile App" above the title "Five findings, no mistakes" and the line "Every one is a default or a testing leftover.", with the MSDEVBUILD wordmark and the author name below. On the right, three stacked boxes joined by arrows: a grey box reading "A working app, one scan, five findings", an arrow labelled "the scan" to a red box reading "An endpoint with no auth, reachable with curl", and an arrow labelled "the order" to a green box reading "Fix that one first, then the other four".

The app works. Customers are ordering. Reviews are fine. Then somebody runs a security scan, and the report comes back with five findings.

Here’s the uncomfortable bit: nobody on the team made a mistake. Every one of these is a default, a leftover from testing, or a line copied from a sample. None of them would survive a code review, because nobody ever wrote them on purpose.

What are the five findings?

#FindingSeverityWhat an attacker needs
1Secret in the app packageHighA copy of your app
2Session token in plain storageHighThe phone, rooted, or a backup
3Endpoint with no authCriticalcurl and a URL
4TLS certificate check disabledHighThe same coffee-shop wifi
5Permissions the app never usesMediumA compromise of the app first

1. A secret in the app package

An API key in strings.xml, Info.plist, a .env bundled into assets, or a constant in your code. An .apk or .ipa is a zip file; anything inside is public.

Fix: the app holds a short-lived user token, your API holds the keys, and Key Vault holds them at rest. The full walkthrough is the first post in this series.

2. The session token in plain storage

SharedPreferences and UserDefaults are plain files. On a rooted or jailbroken phone — or straight out of a device backup — they’re readable.

Fix: Android Keystore or EncryptedSharedPreferences, and the iOS Keychain. In .NET MAUI, use SecureStorage, not Preferences. They’re one word apart and completely different.

3. An endpoint with no auth

Usually /admin, a /health route that happily returns config, /debug, or an internal route someone added to test and never locked down.

Fix: make authorization the default and opt out explicitly, not the other way round:

builder.Services.AddAuthorizationBuilder()
    .SetFallbackPolicy(new AuthorizationPolicyBuilder()
        .RequireAuthenticatedUser().Build());

Now a route you forget about fails closed instead of open.

4. TLS certificate checking disabled

Someone switched it off to test against a local server with a self-signed cert, and it shipped. Every request is now readable by anyone on the same network.

Fix: remove the override. Wrap any dev-only handler in #if DEBUG so it physically can’t end up in a release build.

5. Permissions the app never uses

Contacts, location, camera, storage — copied in from a tutorial. They lower install rates, fail store review more often, and widen what an attacker gets if the app is ever compromised.

Fix: delete every permission, then add back only the ones that break.

Which one should you fix first?

Number 3, and it isn’t close. Findings 1, 2 and 4 need somebody to have your app, your phone or your network. An endpoint with no auth needs nothing — it’s reachable from anywhere on earth right now, and bots are already scanning for it (see the post on automated attacks).

After that, I’d go by how little the attacker needs:

Five findings in fix order, each with who can attack. 1, in red, fix first: an API route with no lock, attackable by anyone on the internet with the URL. 2, a key inside the app, attackable by anyone who downloads and unzips it. 3, the HTTPS security check turned off, attackable by someone on the same wifi. 4, the login token saved in a plain file, attackable by someone holding the phone or its backup. 5, permissions the app does not use, which only help someone who has already broken in. A green box reads "Fix in this order: least access needed first."

Figure 1 — a practical fix order: whatever the attacker can reach with the least access goes first.

How to check your own app today

Key takeaways

  • The five common findings are defaults or testing leftovers, which is exactly why they reach production.
  • An unauthenticated endpoint is the top priority because exploiting it needs no access to the device or network.
  • SharedPreferences and UserDefaults aren’t secure storage — use Keystore/Keychain, or SecureStorage in .NET MAUI.
  • A fallback authorization policy makes a forgotten route fail closed.
  • Audit manifest permissions against what the app really uses, and remove the rest.

Official documentation: .NET MAUI secure storage and the OWASP Mobile Top 10.

Test yourself · 5 questions

Check what you learned

Answer the questions, then submit to see your score and the explanations. Each question is tagged with the certification exam that covers the skill: SC-500, SC-900.

  1. SC-500 Manage and monitor security posture

    1. A scan finds five issues. Which one should you fix first?
  2. SC-500 Secure compute

    2. In .NET MAUI, which API should store the session token?
  3. SC-500 Secure compute

    3. TLS certificate checking was switched off to test against a self-signed local server, and it shipped. What is the fix?
  4. SC-500 Manage identity, access, and governance

    4. Which ASP.NET Core setting makes a forgotten /debug route fail closed instead of open?
  5. SC-900 Describe the concepts of security, compliance, and identity

    5. The app requests contacts, camera and location, but never uses them. What does the article recommend?
0 of 5 answered

Your result

These are practice questions written from this article, not questions taken from a real exam. Exam tags follow the skills listed in each exam's official study guide on Microsoft Learn.

Was this useful?

Share

Found a mistake or an outdated step? Edit this page on GitHub

Frequently asked questions

What are the most common mobile app security vulnerabilities?
Five show up again and again: an API key or secret inside the app package, the session token stored in plain storage, a backend endpoint with no authentication, TLS certificate checking disabled after testing, and permissions the app never actually uses. Almost all of them are defaults or testing leftovers rather than deliberate choices.
Which mobile app security finding should be fixed first?
An endpoint with no authentication, because it is the only common finding that needs no access to the phone or the local network. A secret in the package, a token in plain storage and a disabled TLS check need the app or the same network. An open endpoint is reachable from anywhere with curl, and bots already scan for it.
What is the difference between SharedPreferences/UserDefaults and secure storage on mobile?
SharedPreferences on Android and UserDefaults on iOS are plain files, readable on a rooted or jailbroken device and from a device backup. Android Keystore, iOS Keychain and — in .NET MAUI — the SecureStorage API store values encrypted and tied to the device. In MAUI, Preferences is one word away from SecureStorage and very different.
Why does an app end up with unused permissions like contacts, camera or location?
Usually they were copied in from a starter template or tutorial and never removed. Unused permissions lower install rates, fail store review more often, and widen what an attacker gains if the app is compromised. Delete every permission, then add back only the ones that break something.
Article banner. On the left, the eyebrow "Azure, Securing a Mobile App" above the title "Five steps, in this order" and the line "Secure a mobile API on Azure. The order carries the value.", with the MSDEVBUILD wordmark and the author name below. On the right, three stacked boxes joined by arrows: a grey box reading "HTTPS only, then who are you", an arrow labelled "then" to an amber box reading "Then what may you do, an owner check", and an arrow labelled "last" to a green box reading "Secrets, then monitoring, you find out in an hour".

Next in this series · Part 6 of 10

4 min

Secure a Mobile API in Five Steps: The Order Is the Whole Point

HTTPS, authentication, authorization, secrets, then monitoring — five layers for a mobile API on Azure, and why doing them out of order defeats the point.

Continue the series
Part 4 of 10Hacker vs Azure: Five Attacks and the Five Defences That Stop Them

Get new posts by email

New technical articles, Azure AI and GitHub Copilot updates, and upcoming events. No spam, unsubscribe anytime.

Comments

Your turn

How did Suthahar's articles help you?

If something here saved you time or unblocked a real project, I'd love to hear about it. Submissions are reviewed before they appear on the site.

0/1500 · minimum 10 characters

Never published — used only to verify your feedback.

Your name, company, and role appear publicly if published. Nothing else is collected.

↑↓ navigate ↵ open